Class AbstractAttributePopulator

    • Constructor Detail

      • AbstractAttributePopulator

        public AbstractAttributePopulator()
    • Method Detail

      • isApplicable

        protected abstract boolean isApplicable​(TypeAttributeDescriptor attribute,
                                                PersistenceContext context)
        Determines whether a specific implementation can provide value for the specified attribute.
        Parameters:
        attribute - attribute to make the decision about.
        context - context that may be needed to make the decision.
        Returns:
        true, if this attribute processor is applicable to the specified attribute and can provide a value for it; false, otherwise.
      • populateAttribute

        protected abstract void populateAttribute​(ItemModel item,
                                                  TypeAttributeDescriptor attribute,
                                                  PersistenceContext context)
        Populates value of the specified item attribute.
        Parameters:
        item - item model to be populated.
        attribute - specifies, which attribute should be populated in the item.
        context - context information necessary to derive correct attribute value from the integration item.
      • isNew

        protected boolean isNew​(ItemModel item)
        Determines whether the specified item is new or not.
        Parameters:
        item - an item to check
        Returns:
        true, if the item is new and has not been persisted yet; false, if the item already exists in the persistent storage.
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService service)