Class PaymentMode

    • Constructor Detail

      • PaymentMode

        public PaymentMode()
    • 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
      • getAllNames

        @Deprecated(since="ages",
                    forRemoval=false)
        public java.util.Map getAllNames​(SessionContext ctx)
        Gets all names (in all languages).
        Parameters:
        ctx - A SessionContext object
        Returns:
        map with following combination key:language, value:name
      • setAllNames

        @Deprecated(since="ages",
                    forRemoval=false)
        public void setAllNames​(SessionContext ctx,
                                java.util.Map names)
        Sets names (in all languages).
        Parameters:
        ctx - A SessionContext object
        names - map with following combination key:language, value:name
      • getAllDescriptions

        @Deprecated(since="ages",
                    forRemoval=false)
        public java.util.Map getAllDescriptions​(SessionContext ctx)
        Gets all descriptions (in all languages).
        Parameters:
        ctx - A SessionContext object
        Returns:
        map with following combination key:language, value:description
      • setAllDescriptions

        @Deprecated(since="ages",
                    forRemoval=false)
        public void setAllDescriptions​(SessionContext ctx,
                                       java.util.Map descriptions)
        Gets descriptions (in all languages).
        Parameters:
        ctx - A SessionContext object
        descriptions - map with following combination key:language, value:description
      • addSupportedDeliveryMode

        public void addSupportedDeliveryMode​(DeliveryMode deliveryMode)
        Adds support of given delivery mode to this payment mode.
      • removeSupportedDeliveryMode

        public void removeSupportedDeliveryMode​(DeliveryMode deliveryMode)
        Removes the support of given delivery mode by this payment mode.
      • isSupportedDeliveryMode

        public boolean isSupportedDeliveryMode​(DeliveryMode deliveryMode)
        Checks whether given delivery mode is supported by this payment mode.
        Parameters:
        deliveryMode - delivery mode to check
      • remove

        public void remove​(SessionContext ctx)
                    throws ConsistencyCheckException
        Description copied from class: Item
        Removes this item.

        This method is using the following attributes of the given SessionContext:

        CacheUsage   Language   StagingMethod
        n/a (this is a setter method)   no, language doesn't matter for removal   yes if called on a StageableItem, no otherwise


        Overrides:
        remove in class Item
        Parameters:
        ctx - A SessionContext object
        Throws:
        ConsistencyCheckException - if this item could not be removed for some reason