Class 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 boolean equals​(java.lang.Object obj)
      java.lang.String getAttribute​(java.lang.String strAttributeName)
      Get the value of an attribute from its name
      int getId()
      Returns the IdRule
      java.util.Locale getLocale()
      Get the locale
      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)
      Read attributes from a request
      void setAttribute​(java.lang.String strAttributeName, java.lang.String strAttributeValue)
      Set an 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

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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()
        Get the locale
        Returns:
        The locale
      • setAttribute

        public void setAttribute​(java.lang.String strAttributeName,
                                 java.lang.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 java.lang.String getAttribute​(java.lang.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​(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