fr.paris.lutece.plugins.document.business.rules
Interface Rule

All Superinterfaces:
fr.paris.lutece.portal.service.i18n.Localizable
All Known Implementing Classes:
AbstractRule, MoveSpaceRule, NotifyUsersRule

public interface Rule
extends fr.paris.lutece.portal.service.i18n.Localizable

Interface of rules that can be applied on documents by the RuleEngine


Method Summary
 void apply(Document document, fr.paris.lutece.portal.business.user.AdminUser user)
          Execute the rule
 java.lang.String getAttribute(java.lang.String strAttributeName)
          Gets a specific attribute by its name
 java.lang.String[] getAttributesList()
          Gives all specific attributes of the rule
 java.lang.String getCreateForm(java.util.Locale locale)
          Return the HTML form containing specific fields of the rule
 int getId()
          Gets the Rule Id
 java.lang.String getNameKey()
          Gets the Rule name key
 java.lang.String getRule()
          Gets the Rule definition
 java.lang.String getRuleTypeId()
          Gets the Rule Type Id
 void readAttributes(javax.servlet.http.HttpServletRequest request)
          Reads rule attributes
 void setAttribute(java.lang.String strAttributeName, java.lang.String strAttributeValue)
          Sets a specific rule attribute
 void setId(int nId)
          Sets the Rule Id
 void setRuleTypeId(java.lang.String strId)
          Sets the RuleTypeId
 
Methods inherited from interface fr.paris.lutece.portal.service.i18n.Localizable
setLocale
 

Method Detail

setId

void setId(int nId)
Sets the Rule Id

Parameters:
nId - The rule Id

getId

int getId()
Gets the Rule Id

Returns:
the Rule Id

setRuleTypeId

void setRuleTypeId(java.lang.String strId)
Sets the RuleTypeId

Parameters:
strId - The Rule type Id

getRuleTypeId

java.lang.String getRuleTypeId()
Gets the Rule Type Id

Returns:
the Rule Type Id

getAttribute

java.lang.String getAttribute(java.lang.String strAttributeName)
Gets a specific attribute by its name

Parameters:
strAttributeName - The attribute name
Returns:
The attribute value

setAttribute

void setAttribute(java.lang.String strAttributeName,
                  java.lang.String strAttributeValue)
Sets a specific rule attribute

Parameters:
strAttributeName - The attribute name
strAttributeValue - The attribute value

readAttributes

void readAttributes(javax.servlet.http.HttpServletRequest request)
Reads rule attributes

Parameters:
request - The HTTP request

apply

void apply(Document document,
           fr.paris.lutece.portal.business.user.AdminUser user)
Execute the rule

Parameters:
document - The document concerned
user - The user concerned

getCreateForm

java.lang.String getCreateForm(java.util.Locale locale)
Return the HTML form containing specific fields of the rule

Parameters:
locale - The Locale
Returns:
The Create HTML form

getAttributesList

java.lang.String[] getAttributesList()
Gives all specific attributes of the rule

Returns:
A string array containing all attributes names

getRule

java.lang.String getRule()
Gets the Rule definition

Returns:
The Rule definition

getNameKey

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

Returns:
The Rule name key


Copyright © 2007 Mairie de Paris. All Rights Reserved.