Class AbstractRule
- java.lang.Object
-
- fr.paris.lutece.plugins.document.business.rules.AbstractRule
-
- All Implemented Interfaces:
Rule,fr.paris.lutece.portal.service.i18n.Localizable
- Direct Known Subclasses:
MoveSpaceRule,NotifyUsersRule
public abstract class AbstractRule extends java.lang.Object implements Rule
Default implementation of a rule
-
-
Constructor Summary
Constructors Constructor Description AbstractRule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanequals(java.lang.Object obj)java.lang.StringgetAttribute(java.lang.String strAttributeName)Get the value of an attribute from its nameintgetId()Returns the IdRulejava.util.LocalegetLocale()Get the localejava.lang.StringgetRuleTypeId()Returns the IdRuleTypefr.paris.lutece.portal.business.user.AdminUsergetUser()Gets the current uservoidreadAttributes(javax.servlet.http.HttpServletRequest request)Read attributes from a requestvoidsetAttribute(java.lang.String strAttributeName, java.lang.String strAttributeValue)Set an attributevoidsetId(int nIdRule)Sets the IdRulevoidsetLocale(java.util.Locale locale)Sets the localevoidsetRuleTypeId(java.lang.String strIdRuleType)Sets the IdRuleTypevoidsetUser(fr.paris.lutece.portal.business.user.AdminUser user)set the current user-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.paris.lutece.plugins.document.business.rules.Rule
apply, getAttributesList, getCreateForm, getNameKey, getRule, init, isAuthorized, validateRule
-
-
-
-
Method Detail
-
getId
public int getId()
Returns the IdRule
-
setId
public void setId(int nIdRule)
Sets the IdRule
-
getRuleTypeId
public java.lang.String getRuleTypeId()
Returns the IdRuleType- Specified by:
getRuleTypeIdin interfaceRule- Returns:
- The IdRuleType
-
setRuleTypeId
public void setRuleTypeId(java.lang.String strIdRuleType)
Sets the IdRuleType- Specified by:
setRuleTypeIdin interfaceRule- Parameters:
strIdRuleType- The IdRuleType
-
setLocale
public void setLocale(java.util.Locale locale)
Sets the locale- Specified by:
setLocalein interfacefr.paris.lutece.portal.service.i18n.Localizable- Parameters:
locale- The locale
-
getLocale
public java.util.Locale getLocale()
Get the locale- Returns:
- The locale
-
setAttribute
public void setAttribute(java.lang.String strAttributeName, java.lang.String strAttributeValue)Set an attribute- Specified by:
setAttributein interfaceRule- Parameters:
strAttributeName- the name of the attributestrAttributeValue- the value of the attribute
-
getAttribute
public java.lang.String getAttribute(java.lang.String strAttributeName)
Get the value of an attribute from its name- Specified by:
getAttributein interfaceRule- Parameters:
strAttributeNamethe- name of the attribute- Returns:
- the value of the attribute
-
readAttributes
public void readAttributes(javax.servlet.http.HttpServletRequest request)
Read attributes from a request- Specified by:
readAttributesin interfaceRule- Parameters:
request- The request
-
equals
public abstract boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getUser
public fr.paris.lutece.portal.business.user.AdminUser getUser()
Gets the current user
-
-