Class GeneratedRestriction

    • Field Detail

      • POSITIVE

        public static final java.lang.String POSITIVE
        Qualifier of the Restriction.positive attribute
        See Also:
        Constant Field Values
      • DESCRIPTION

        public static final java.lang.String DESCRIPTION
        Qualifier of the Restriction.description attribute
        See Also:
        Constant Field Values
      • VIOLATIONMESSAGE

        public static final java.lang.String VIOLATIONMESSAGE
        Qualifier of the Restriction.violationMessage attribute
        See Also:
        Constant Field Values
      • RESTRICTIONTYPE

        public static final java.lang.String RESTRICTIONTYPE
        Qualifier of the Restriction.restrictionType attribute
        See Also:
        Constant Field Values
      • VOUCHERPOS

        public static final java.lang.String VOUCHERPOS
        Qualifier of the Restriction.voucherPOS attribute
        See Also:
        Constant Field Values
      • VOUCHER

        public static final java.lang.String VOUCHER
        Qualifier of the Restriction.voucher attribute
        See Also:
        Constant Field Values
      • DEFAULT_INITIAL_ATTRIBUTES

        protected static final java.util.Map<java.lang.String,​Item.AttributeMode> DEFAULT_INITIAL_ATTRIBUTES
    • Constructor Detail

      • GeneratedRestriction

        public GeneratedRestriction()
    • Method Detail

      • createItem

        protected Item createItem​(SessionContext ctx,
                                  ComposedType type,
                                  Item.ItemAttributeMap allAttributes)
                           throws JaloBusinessException
        Description copied from class: Item
        Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) during ComposedType.newInstance(Map).

        In case this method uses any of the attribute values during creation it is required to override Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
        Sn example:

        
         public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
         ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
         man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
         // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
         SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
         super.getNonInitialAttributes( ctx, allAttributes );
         // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
        
         
        Overrides:
        createItem in class GenericItem
        Parameters:
        ctx - the current session context which this item is created within
        type - the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )
        Returns:
        the new item instance
        Throws:
        JaloBusinessException - indicates an error during creation - any changes will be rollbacked
      • getDescription

        public java.lang.String getDescription​(SessionContext ctx)
        Generated method - Getter of the Restriction.description attribute.
        Returns:
        the description - the description of the restriction.
      • getDescription

        public java.lang.String getDescription()
        Generated method - Getter of the Restriction.description attribute.
        Returns:
        the description - the description of the restriction.
      • getAllDescription

        public java.util.Map<Language,​java.lang.String> getAllDescription​(SessionContext ctx)
        Generated method - Getter of the Restriction.description attribute.
        Returns:
        the localized description - the description of the restriction.
      • getAllDescription

        public java.util.Map<Language,​java.lang.String> getAllDescription()
        Generated method - Getter of the Restriction.description attribute.
        Returns:
        the localized description - the description of the restriction.
      • setDescription

        public void setDescription​(SessionContext ctx,
                                   java.lang.String value)
        Generated method - Setter of the Restriction.description attribute.
        Parameters:
        value - the description - the description of the restriction.
      • setDescription

        public void setDescription​(java.lang.String value)
        Generated method - Setter of the Restriction.description attribute.
        Parameters:
        value - the description - the description of the restriction.
      • setAllDescription

        public void setAllDescription​(SessionContext ctx,
                                      java.util.Map<Language,​java.lang.String> value)
        Generated method - Setter of the Restriction.description attribute.
        Parameters:
        value - the description - the description of the restriction.
      • setAllDescription

        public void setAllDescription​(java.util.Map<Language,​java.lang.String> value)
        Generated method - Setter of the Restriction.description attribute.
        Parameters:
        value - the description - the description of the restriction.
      • isPositive

        public java.lang.Boolean isPositive​(SessionContext ctx)
        Generated method - Getter of the Restriction.positive attribute.
        Returns:
        the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • isPositive

        public java.lang.Boolean isPositive()
        Generated method - Getter of the Restriction.positive attribute.
        Returns:
        the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • isPositiveAsPrimitive

        public boolean isPositiveAsPrimitive​(SessionContext ctx)
        Generated method - Getter of the Restriction.positive attribute.
        Returns:
        the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • isPositiveAsPrimitive

        public boolean isPositiveAsPrimitive()
        Generated method - Getter of the Restriction.positive attribute.
        Returns:
        the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • setPositive

        public void setPositive​(SessionContext ctx,
                                java.lang.Boolean value)
        Generated method - Setter of the Restriction.positive attribute.
        Parameters:
        value - the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • setPositive

        public void setPositive​(java.lang.Boolean value)
        Generated method - Setter of the Restriction.positive attribute.
        Parameters:
        value - the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • setPositive

        public void setPositive​(SessionContext ctx,
                                boolean value)
        Generated method - Setter of the Restriction.positive attribute.
        Parameters:
        value - the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • setPositive

        public void setPositive​(boolean value)
        Generated method - Setter of the Restriction.positive attribute.
        Parameters:
        value - the positive - Specifies if this restriction is a positive (true) or negative (false) one.
      • getRestrictionType

        public abstract java.lang.String getRestrictionType​(SessionContext ctx)
        Generated method - Getter of the Restriction.restrictionType attribute.
        Returns:
        the restrictionType - the type of this restriction.
      • getRestrictionType

        public java.lang.String getRestrictionType()
        Generated method - Getter of the Restriction.restrictionType attribute.
        Returns:
        the restrictionType - the type of this restriction.
      • getAllRestrictionType

        public abstract java.util.Map<Language,​java.lang.String> getAllRestrictionType​(SessionContext ctx)
        Generated method - Getter of the Restriction.restrictionType attribute.
        Returns:
        the localized restrictionType - the type of this restriction.
      • getAllRestrictionType

        public java.util.Map<Language,​java.lang.String> getAllRestrictionType()
        Generated method - Getter of the Restriction.restrictionType attribute.
        Returns:
        the localized restrictionType - the type of this restriction.
      • getViolationMessage

        public java.lang.String getViolationMessage​(SessionContext ctx)
        Generated method - Getter of the Restriction.violationMessage attribute.
        Returns:
        the violationMessage - the message to return if the restriction is violated (not fulfilled).
      • getViolationMessage

        public java.lang.String getViolationMessage()
        Generated method - Getter of the Restriction.violationMessage attribute.
        Returns:
        the violationMessage - the message to return if the restriction is violated (not fulfilled).
      • getAllViolationMessage

        public java.util.Map<Language,​java.lang.String> getAllViolationMessage​(SessionContext ctx)
        Generated method - Getter of the Restriction.violationMessage attribute.
        Returns:
        the localized violationMessage - the message to return if the restriction is violated (not fulfilled).
      • getAllViolationMessage

        public java.util.Map<Language,​java.lang.String> getAllViolationMessage()
        Generated method - Getter of the Restriction.violationMessage attribute.
        Returns:
        the localized violationMessage - the message to return if the restriction is violated (not fulfilled).
      • setViolationMessage

        public void setViolationMessage​(SessionContext ctx,
                                        java.lang.String value)
        Generated method - Setter of the Restriction.violationMessage attribute.
        Parameters:
        value - the violationMessage - the message to return if the restriction is violated (not fulfilled).
      • setViolationMessage

        public void setViolationMessage​(java.lang.String value)
        Generated method - Setter of the Restriction.violationMessage attribute.
        Parameters:
        value - the violationMessage - the message to return if the restriction is violated (not fulfilled).
      • setAllViolationMessage

        public void setAllViolationMessage​(SessionContext ctx,
                                           java.util.Map<Language,​java.lang.String> value)
        Generated method - Setter of the Restriction.violationMessage attribute.
        Parameters:
        value - the violationMessage - the message to return if the restriction is violated (not fulfilled).
      • setAllViolationMessage

        public void setAllViolationMessage​(java.util.Map<Language,​java.lang.String> value)
        Generated method - Setter of the Restriction.violationMessage attribute.
        Parameters:
        value - the violationMessage - the message to return if the restriction is violated (not fulfilled).
      • getVoucher

        public Voucher getVoucher​(SessionContext ctx)
        Generated method - Getter of the Restriction.voucher attribute.
        Returns:
        the voucher
      • getVoucher

        public Voucher getVoucher()
        Generated method - Getter of the Restriction.voucher attribute.
        Returns:
        the voucher
      • setVoucher

        protected void setVoucher​(SessionContext ctx,
                                  Voucher value)
        Generated method - Setter of the Restriction.voucher attribute.
        Parameters:
        value - the voucher
      • setVoucher

        protected void setVoucher​(Voucher value)
        Generated method - Setter of the Restriction.voucher attribute.
        Parameters:
        value - the voucher