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 Object
implements Rule

Default implementation of a rule


Constructor Summary
AbstractRule()
           
 
Method Summary
abstract  boolean equals(Object obj)
          
 String getAttribute(String strAttributeName)
          Get the value of an attribute from its name
 int getId()
          Returns the IdRule
 Locale getLocale()
          Get the locale
 String getRuleTypeId()
          Returns the IdRuleType
 fr.paris.lutece.portal.business.user.AdminUser getUser()
          Gets the current user
 void readAttributes(javax.servlet.http.HttpServletRequest request)
          Read attributes from a request
 void setAttribute(String strAttributeName, String strAttributeValue)
          Set an attribute
 void setId(int nIdRule)
          Sets the IdRule
 void setLocale(Locale locale)
          Sets the locale
 void setRuleTypeId(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 String getRuleTypeId()
Returns the IdRuleType

Specified by:
getRuleTypeId in interface Rule
Returns:
The IdRuleType

setRuleTypeId

public void setRuleTypeId(String strIdRuleType)
Sets the IdRuleType

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

setLocale

public void setLocale(Locale locale)
Sets the locale

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

getLocale

public Locale getLocale()
Get the locale

Returns:
The locale

setAttribute

public void setAttribute(String strAttributeName,
                         String strAttributeValue)
Set an attribute

Specified by:
setAttribute in interface Rule
Parameters:
strAttributeName - the name of the attribute
strAttributeValue - the value of the attribute

getAttribute

public String getAttribute(String strAttributeName)
Get the value of an attribute from its name

Specified by:
getAttribute in interface Rule
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:
readAttributes in interface Rule
Parameters:
request - The request

equals

public abstract boolean equals(Object obj)

Overrides:
equals in class 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 © 2013 Mairie de Paris. All Rights Reserved.