Class MoveSpaceRule
java.lang.Object
fr.paris.lutece.plugins.document.business.rules.AbstractRule
fr.paris.lutece.plugins.document.modules.rulemovespace.business.MoveSpaceRule
- All Implemented Interfaces:
Rule,fr.paris.lutece.portal.service.i18n.Localizable
This rule lets move a document from a space to another when the document's state is changing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(DocumentEvent event) Execute the rulebooleanString[]Gets all attributes of the rulegetCreateForm(fr.paris.lutece.portal.business.user.AdminUser user, Locale locale) Gets a specific form to enter rule's attributesGets the Rule name keystatic StringGet the parameter key for the destination space Idstatic StringGet the parameter key for the source space Idstatic StringGet the parameter key for the state IdgetRule()Gets the explicit text of the rulevoidinit()Initialize the rulebooleanisAuthorized(fr.paris.lutece.portal.business.user.AdminUser user) true if the user is authorized to view the ruleCheck the ruleMethods inherited from class fr.paris.lutece.plugins.document.business.rules.AbstractRule
getAttribute, getId, getLocale, getRuleTypeId, getUser, readAttributes, setAttribute, setId, setLocale, setRuleTypeId, setUser
-
Constructor Details
-
MoveSpaceRule
public MoveSpaceRule()
-
-
Method Details
-
init
public void init()Initialize the rule -
getNameKey
Gets the Rule name key- Returns:
- The Rule name key
-
apply
Execute the rule- Parameters:
event- The document event- Throws:
DocumentException- raise when error occurs in event or rule
-
getCreateForm
Gets a specific form to enter rule's attributes- Parameters:
user- The current userlocale- The current Locale- Returns:
- The HTML code of the form
-
isAuthorized
public boolean isAuthorized(fr.paris.lutece.portal.business.user.AdminUser user) true if the user is authorized to view the rule- Parameters:
user- the current user- Returns:
- true if the user is authorized to view the rule
-
validateRule
Check the rule- Returns:
- null if rule is valid, message if rule not valid
-
getAttributesList
Gets all attributes of the rule- Returns:
- attributes of the rule
-
getRule
Gets the explicit text of the rule- Returns:
- The text of the rule
-
getParameterKeySourceSpaceId
Get the parameter key for the source space Id- Returns:
- The parameter key
-
getParameterKeyDestinationSpaceId
Get the parameter key for the destination space Id- Returns:
- The parameter key
-
getParameterKeyStateId
Get the parameter key for the state Id- Returns:
- The parameter key
-
equals
Description copied from class:AbstractRule- Specified by:
equalsin classAbstractRule
-