fr.paris.lutece.plugins.document.business.rules
Class AbstractRule

java.lang.Object
  extended by 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
AbstractRule()
           
 
Method Summary
abstract  boolean equals(java.lang.Object obj)
           
 java.lang.String getAttribute(java.lang.String strAttributeName)
          Gets a specific attribute by its name
 int getId()
          Returns the IdRule
 java.util.Locale getLocale()
           
 java.lang.String getRuleTypeId()
          Returns the IdRuleType
 fr.paris.lutece.portal.business.user.AdminUser getUser()
          Gets the current user
 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 nIdRule)
          Sets the IdRule
 void setLocale(java.util.Locale locale)
          Sets the locale
 void setRuleTypeId(java.lang.String strIdRuleType)
          Sets the IdRuleType
 void setUser(fr.paris.lutece.portal.business.user.AdminUser user)
          set the current user
 
Methods inherited from class java.lang.Object
clone, finalize, 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
 

Constructor Detail

AbstractRule

public AbstractRule()
Method Detail

getId

public int getId()
Returns the IdRule

Specified by:
getId in interface Rule
Returns:
The IdRule

setId

public void setId(int nIdRule)
Sets the IdRule

Specified by:
setId in interface Rule
Parameters:
nIdRule - The IdRule

getRuleTypeId

public java.lang.String getRuleTypeId()
Returns the IdRuleType

Specified by:
getRuleTypeId in interface Rule
Returns:
The IdRuleType

setRuleTypeId

public void setRuleTypeId(java.lang.String strIdRuleType)
Sets the IdRuleType

Specified by:
setRuleTypeId in interface Rule
Parameters:
strIdRuleType - The IdRuleType

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale

Specified by:
setLocale in interface fr.paris.lutece.portal.service.i18n.Localizable
Parameters:
locale - The locale

getLocale

public java.util.Locale getLocale()
Returns:

setAttribute

public void setAttribute(java.lang.String strAttributeName,
                         java.lang.String strAttributeValue)
Description copied from interface: Rule
Sets a specific rule attribute

Specified by:
setAttribute in interface Rule
Parameters:
strAttributeName -
strAttributeValue -

getAttribute

public java.lang.String getAttribute(java.lang.String strAttributeName)
Description copied from interface: Rule
Gets a specific attribute by its name

Specified by:
getAttribute in interface Rule
Parameters:
strAttributeName -
Returns:

readAttributes

public void readAttributes(javax.servlet.http.HttpServletRequest request)
Description copied from interface: Rule
Reads rule attributes

Specified by:
readAttributes in interface Rule
Parameters:
request -

equals

public abstract boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getUser

public fr.paris.lutece.portal.business.user.AdminUser getUser()
Gets the current user

Specified by:
getUser in interface Rule
Returns:
The the current user

setUser

public void setUser(fr.paris.lutece.portal.business.user.AdminUser user)
set the current user

Specified by:
setUser in interface Rule
Parameters:
user - the current user


Copyright © 2009 Mairie de Paris. All Rights Reserved.