Class NotifyUsersRule
java.lang.Object
fr.paris.lutece.plugins.document.business.rules.AbstractRule
fr.paris.lutece.plugins.document.modules.rulenotifyusers.business.NotifyUsersRule
- All Implemented Interfaces:
Rule,fr.paris.lutece.portal.service.i18n.Localizable,Serializable
@Dependent
@Named("document.NotifyUsersRule")
public class NotifyUsersRule
extends AbstractRule
implements Serializable
This class provides a rule to notify users on document events
- See Also:
-
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 the Rule create formGets the Rule name keystatic StringGet the parameter key for the mailing list 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
-
NotifyUsersRule
public NotifyUsersRule()
-
-
Method Details
-
init
public void init()Initialize the rule -
getNameKey
Gets the Rule name key- Specified by:
getNameKeyin interfaceRule- Returns:
- The Rule name key
-
apply
Execute the rule- Specified by:
applyin interfaceRule- Parameters:
event- The document event- Throws:
DocumentException- raise when error occurs in event or rule
-
getCreateForm
Gets the Rule create form- Specified by:
getCreateFormin interfaceRule- Parameters:
user- The current user using the formlocale- The current locale- Returns:
- The HTML form
-
validateRule
Check the rule- Specified by:
validateRulein interfaceRule- Returns:
- null if rule is valid, message if rule not valid
-
isAuthorized
public boolean isAuthorized(fr.paris.lutece.portal.business.user.AdminUser user) true if the user is authorized to view the rule- Specified by:
isAuthorizedin interfaceRule- Parameters:
user- the current user- Returns:
- true if the user is authorized to view the rule
-
getAttributesList
Gets all attributes of the rule- Specified by:
getAttributesListin interfaceRule- Returns:
- attributes of the rule
-
getRule
Gets the explicit text of the rule -
getParameterKeyMailingListId
Get the parameter key for the mailing list Id- Returns:
- The parameter key
-
getParameterKeySourceSpaceId
Get the parameter key for the source 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
-