Package mg.emberframework.core.data
Class InitParameter
java.lang.Object
mg.emberframework.core.data.InitParameter
Holds initialization parameters for the framework.
This class stores configuration settings such as parameter names for errors, controller packages, and role attributes, with default values if not specified.
- Since:
- 1.0.0
- Version:
- 1.0.0
- Author:
- Sandratra NIAINA
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.InitParameter
(String errorParamName, String controllerPackageName, String errorRedirectionParamName, String roleAttributeName) Constructs an initialization parameter object with specified values. -
Method Summary
Modifier and TypeMethodDescriptionGets the controller package name.Gets the error parameter name.Gets the error redirection parameter name.Gets the role attribute name.void
setControllerPackageName
(String controllerPackageName) Sets the controller package name, defaulting to "controllers" if null.void
setErrorParamName
(String errorParamName) Sets the error parameter name, defaulting to "errors" if null.void
setErrorRedirectionParamName
(String errorRedirectionParamName) Sets the error redirection parameter name, defaulting to "error-url" if null.void
setRoleAttributeName
(String roleAttributeName) Sets the role attribute name, defaulting to "role" if null.
-
Constructor Details
-
InitParameter
public InitParameter()Default constructor. -
InitParameter
public InitParameter(String errorParamName, String controllerPackageName, String errorRedirectionParamName, String roleAttributeName) Constructs an initialization parameter object with specified values.- Parameters:
errorParamName
- the error parameter namecontrollerPackageName
- the controller package nameerrorRedirectionParamName
- the error redirection parameter nameroleAttributeName
- the role attribute name
-
-
Method Details
-
getErrorParamName
Gets the error parameter name.- Returns:
- the error parameter name
-
setErrorParamName
Sets the error parameter name, defaulting to "errors" if null.- Parameters:
errorParamName
- the name to set
-
getControllerPackageName
Gets the controller package name.- Returns:
- the controller package name
-
setControllerPackageName
Sets the controller package name, defaulting to "controllers" if null.- Parameters:
controllerPackageName
- the name to set
-
getErrorRedirectionParamName
Gets the error redirection parameter name.- Returns:
- the error redirection parameter name
-
setErrorRedirectionParamName
Sets the error redirection parameter name, defaulting to "error-url" if null.- Parameters:
errorRedirectionParamName
- the name to set
-
getRoleAttributeName
Gets the role attribute name.- Returns:
- the role attribute name
-
setRoleAttributeName
Sets the role attribute name, defaulting to "role" if null.- Parameters:
roleAttributeName
- the name to set
-