fr.paris.lutece.plugins.document.modules.rulenotifyusers.business
Class NotifyUsersRule

java.lang.Object
  extended by fr.paris.lutece.plugins.document.business.rules.AbstractRule
      extended by fr.paris.lutece.plugins.document.modules.rulenotifyusers.business.NotifyUsersRule
All Implemented Interfaces:
Rule, fr.paris.lutece.portal.service.i18n.Localizable

public class NotifyUsersRule
extends AbstractRule

This class provides a rule to notify users on document events


Constructor Summary
NotifyUsersRule()
           
 
Method Summary
 void apply(DocumentEvent event)
          Execute the rule
 boolean equals(java.lang.Object obj)
           
 java.lang.String[] getAttributesList()
          Gets all attributes of the rule
 java.lang.String getCreateForm(fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)
          Gets the Rule create form
 java.lang.String getNameKey()
          Gets the Rule name key
static java.lang.String getParameterKeyMailingListId()
          Get the parameter key for the mailing list Id
static java.lang.String getParameterKeySourceSpaceId()
          Get the parameter key for the source space Id
static java.lang.String getParameterKeyStateId()
          Get the parameter key for the state Id
 java.lang.String getRule()
          Gets the explicit text of the rule
 void init()
          Initialize the rule
 boolean isAuthorized(fr.paris.lutece.portal.business.user.AdminUser user)
          true if the user is authorized to view the rule
 java.lang.String validateRule()
          Check the rule
 
Methods inherited from class fr.paris.lutece.plugins.document.business.rules.AbstractRule
getAttribute, getId, getLocale, getRuleTypeId, getUser, readAttributes, setAttribute, setId, setLocale, setRuleTypeId, setUser
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifyUsersRule

public NotifyUsersRule()
Method Detail

init

public void init()
Initialize the rule


getNameKey

public java.lang.String getNameKey()
Gets the Rule name key

Returns:
The Rule name key

apply

public void apply(DocumentEvent event)
           throws DocumentException
Execute the rule

Parameters:
event - The document event
Throws:
DocumentException - raise when error occurs in event or rule

getCreateForm

public java.lang.String getCreateForm(fr.paris.lutece.portal.business.user.AdminUser user,
                                      java.util.Locale locale)
Gets the Rule create form

Parameters:
user - The current user using the form
locale - The current locale
Returns:
The HTML form

validateRule

public java.lang.String validateRule()
Check the rule

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

Parameters:
user - the current user
Returns:
true if the user is authorized to view the rule

getAttributesList

public java.lang.String[] getAttributesList()
Gets all attributes of the rule

Returns:
attributes of the rule

getRule

public java.lang.String getRule()
Gets the explicit text of the rule

Returns:
The text of the rule

getParameterKeyMailingListId

public static java.lang.String getParameterKeyMailingListId()
Get the parameter key for the mailing list Id

Returns:
The parameter key

getParameterKeySourceSpaceId

public static java.lang.String getParameterKeySourceSpaceId()
Get the parameter key for the source space Id

Returns:
The parameter key

getParameterKeyStateId

public static java.lang.String getParameterKeyStateId()
Get the parameter key for the state Id

Returns:
The parameter key

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in class AbstractRule


Copyright © 2009 Mairie de Paris. All Rights Reserved.