Class MoveSpaceRule

  • All Implemented Interfaces:
    Rule, fr.paris.lutece.portal.service.i18n.Localizable

    public class MoveSpaceRule
    extends AbstractRule
    This rule lets move a document from a space to another when the document's state is changing
    • Constructor Detail

      • MoveSpaceRule

        public MoveSpaceRule()
    • Method Detail

      • init

        public void init()
        Initialize the rule
      • getNameKey

        public java.lang.String getNameKey()
        Gets the Rule name key
        Returns:
        The Rule name key
      • getCreateForm

        public java.lang.String getCreateForm​(fr.paris.lutece.portal.business.user.AdminUser user,
                                              java.util.Locale locale)
        Gets a specific form to enter rule's attributes
        Parameters:
        user - The current user
        locale - The current Locale
        Returns:
        The HTML code of the form
      • isAuthorized

        public boolean isAuthorized​(fr.paris.lutece.portal.business.user.AdminUser user)
        true if the user is authorized to view the rule
        Parameters:
        user - the current user
        Returns:
        true if the user is authorized to view the rule
      • validateRule

        public java.lang.String validateRule()
        Check the rule
        Returns:
        null if rule is valid, message if rule not valid
      • getAttributesList

        public java.lang.String[] getAttributesList()
        Gets all attributes of the rule
        Returns:
        attributes of the rule
      • getRule

        public java.lang.String getRule()
        Gets the explicit text of the rule
        Returns:
        The text of the rule
      • getParameterKeySourceSpaceId

        public static java.lang.String getParameterKeySourceSpaceId()
        Get the parameter key for the source space Id
        Returns:
        The parameter key
      • getParameterKeyDestinationSpaceId

        public static java.lang.String getParameterKeyDestinationSpaceId()
        Get the parameter key for the destination space Id
        Returns:
        The parameter key
      • getParameterKeyStateId

        public static java.lang.String getParameterKeyStateId()
        Get the parameter key for the state Id
        Returns:
        The parameter key