Class GeneratedRestriction

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
Restriction

public abstract class GeneratedRestriction extends GenericItem
Generated class for type Restriction.
See Also:
  • Field Details

  • Constructor Details

    • GeneratedRestriction

      public GeneratedRestriction()
  • Method Details

    • getDefaultAttributeModes

      protected Map<String,Item.AttributeMode> getDefaultAttributeModes()
      Overrides:
      getDefaultAttributeModes in class Item
    • 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 String getDescription(SessionContext ctx)
      Generated method - Getter of the Restriction.description attribute.
      Returns:
      the description - the description of the restriction.
    • getDescription

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

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

      public Map<Language,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, String value)
      Generated method - Setter of the Restriction.description attribute.
      Parameters:
      value - the description - the description of the restriction.
    • setDescription

      public void setDescription(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, Map<Language,String> value)
      Generated method - Setter of the Restriction.description attribute.
      Parameters:
      value - the description - the description of the restriction.
    • setAllDescription

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

      public 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 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, 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.
    • 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 String getRestrictionType(SessionContext ctx)
      Generated method - Getter of the Restriction.restrictionType attribute.
      Returns:
      the restrictionType - the type of this restriction.
    • getRestrictionType

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

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

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

      public 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 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 Map<Language,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 Map<Language,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, 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(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, Map<Language,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(Map<Language,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