Class GenericResource

All Implemented Interfaces:
IElement, ILinkedResource, IResource, IDeletionSupport, IProtocolSupport, ISearchSupport, ISecuritySupport, Serializable

public class GenericResource extends ProcessElement implements IResource, ILinkedResource
Author:
vlygeros
See Also:
  • Field Details

    • LOGGER

      public static final com.axemble.vdp.utils.Logger LOGGER
    • document

      protected com.axemble.vdp.ui.core.document.GenericDocument document
    • createdBy

      protected IUser createdBy
    • createdDate

      protected Date createdDate
    • modifiedBy

      protected IUser modifiedBy
    • modifiedDate

      protected Date modifiedDate
  • Constructor Details

    • GenericResource

      public GenericResource(IModule module, com.axemble.vdp.ui.core.document.GenericDocument document)
      Parameters:
      module -
  • Method Details

    • addLinkedResource

      public boolean addLinkedResource(ILinkedResource linkedResource)
      Description copied from interface: IResource
      Allows to add a linked resource.
      Specified by:
      addLinkedResource in interface IResource
      Parameters:
      linkedResource - The ILinkedResource to add.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • addLinkedResources

      public boolean addLinkedResources(Collection linkedResources)
      Description copied from interface: IResource
      Allows to add linked resources.
      Specified by:
      addLinkedResources in interface IResource
      Parameters:
      linkedResources - The collection of ILinkedResource objects to add.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • allowEvents

      public void allowEvents()
      Description copied from interface: IResource
      Allows events to be thrown.
      Specified by:
      allowEvents in interface IResource
    • denyEvents

      public void denyEvents()
      Description copied from interface: IResource
      Prevents from throwing events.
      Specified by:
      denyEvents in interface IResource
    • createLinkedResource

      public ILinkedResource createLinkedResource(String propertyName)
      Description copied from interface: IResource
      Creates a linked resource within a property.
      Specified by:
      createLinkedResource in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      a ILinkedResource object.
    • deleteLinkedResource

      public void deleteLinkedResource(ILinkedResource linkedResource)
      Description copied from interface: IResource
      Allows to remove a linked resource.
      Specified by:
      deleteLinkedResource in interface IResource
      Parameters:
      linkedResource - The ILinkedResource to remove.
    • deleteLinkedResources

      public void deleteLinkedResources(Collection linkedResources)
      Description copied from interface: IResource
      Allows to remove a collection of linked resources.
      Specified by:
      deleteLinkedResources in interface IResource
      Parameters:
      linkedResources - The collection of ILinkedResource objects.
    • exists

      public boolean exists(String propertyName)
      Description copied from interface: IResource
      Checks if a property exists.
      Specified by:
      exists in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      true if the property exists,
      invalid @link
      {@link false
      } otherwise.
    • getCreatedBy

      public IUser getCreatedBy()
      Description copied from interface: IResource
      Gets the creator of the resource.
      Specified by:
      getCreatedBy in interface IResource
      Returns:
      a IUser object.
    • getCreatedDate

      public Date getCreatedDate()
      Description copied from interface: IResource
      Gets the created date.
      Specified by:
      getCreatedDate in interface IResource
      Returns:
      a Date object.
    • getDefinition

      public IResourceDefinition getDefinition()
      Description copied from interface: IResource
      Gets the definition of the resource
      Specified by:
      getDefinition in interface IResource
      Returns:
      A IResourceDefinition object.
    • getHistory

      public IResourceHistory getHistory()
      Description copied from interface: IResource
      Gets the history of the resource
      Specified by:
      getHistory in interface IResource
      Returns:
      a IResourceHistory object.
    • getLinkedResources

      public Collection getLinkedResources(String propertyName)
      Description copied from interface: IResource
      Retrieves all the linked resources of a property.
      Specified by:
      getLinkedResources in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      A java.util.Collection of ILinkedResource objects.
    • getList

      public Collection getList(String propertyName)
      Description copied from interface: IResource
      Gets the available values of a list property.
      Specified by:
      getList in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      A java.util.Collection of IOptionList.IOption.
    • getModifiedBy

      public IUser getModifiedBy()
      Description copied from interface: IResource
      Gets the last user who modified the resource.
      Specified by:
      getModifiedBy in interface IResource
      Returns:
      a IUser object.
    • getModifiedDate

      public Date getModifiedDate()
      Description copied from interface: IResource
      Gets the modified date.
      Specified by:
      getModifiedDate in interface IResource
      Returns:
      a Date object.
    • getName

      public String getName()
      Description copied from interface: IResource
      Gets the name of a resource.
      Specified by:
      getName in interface IResource
      Returns:
      a string object.
    • getValue

      public Object getValue(String propertyName)
      Description copied from interface: IResource
      Gets the value of a property.
      Specified by:
      getValue in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      an Object.
    • save

      public boolean save()
      Description copied from interface: IResource
      Saves the resource.
      Specified by:
      save in interface IResource
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • save

      public boolean save(String propertyName)
      Description copied from interface: IResource
      Saves a specified property.
      Specified by:
      save in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • setCreatedDate

      public void setCreatedDate(Date date)
      Description copied from interface: IResource
      Sets the created date.
      Specified by:
      setCreatedDate in interface IResource
      Parameters:
      date - The Date to set.
    • setCreatedBy

      public void setCreatedBy(IUser createdBy)
      Description copied from interface: IResource
      Sets the creator of the resource. Can only be set if the resource has not been created yet
      Specified by:
      setCreatedBy in interface IResource
      Parameters:
      createdBy - The creator IUser of the resource.
    • setList

      public void setList(String propertyName, Collection value)
      Description copied from interface: IResource
      Sets the available values for a list property.
      Specified by:
      setList in interface IResource
      Parameters:
      propertyName - The system name of the property.
      value - A java.util.Collection of IOptionList.IOption objects..
    • setModifiedBy

      public void setModifiedBy(IUser user)
      Description copied from interface: IResource
      Sets last user who modified the resource.
      Specified by:
      setModifiedBy in interface IResource
      Parameters:
      user - The last IUser who modified the resource.
    • setModifiedDate

      public void setModifiedDate(Date date)
      Description copied from interface: IResource
      Sets the modified date.
      Specified by:
      setModifiedDate in interface IResource
      Parameters:
      date - The Date to set.
    • setValue

      public void setValue(String propertyName, Object value)
      Description copied from interface: IResource
      Sets a value to a property
      Specified by:
      setValue in interface IResource
      Parameters:
      propertyName - The system name of the property.
      value - The value object to set.
    • setValue

      public void setValue(String propertyName, Object value, boolean throwEvents)
    • setValueNoEvents

      public void setValueNoEvents(String propertyName, Object value)
      Description copied from interface: IResource
      Sets a value to a property without throwing any event.
      Specified by:
      setValueNoEvents in interface IResource
      Parameters:
      propertyName - The system name of the property.
      value - The value object to set.
    • getNativeObject

      public Object getNativeObject()
      Description copied from interface: IElement
      Gets the native object underneath.
      Specified by:
      getNativeObject in interface IElement
      Returns:
      an object.
    • delete

      public void delete(IContext context)
      Description copied from interface: IDeletionSupport
      Deletes the IElement object.
      Specified by:
      delete in interface IDeletionSupport
      Parameters:
      context - The Execution context.
    • getCatalog

      public ICatalog getCatalog()
      Description copied from interface: ILinkedResource
      Gets the catalog of the linked resource
      Specified by:
      getCatalog in interface ILinkedResource
      Returns:
      A ICatalog object.
    • getParentInstance

      public IWorkflowInstance getParentInstance()
      Description copied from interface: ILinkedResource
      Gets the parent instance.
      Specified by:
      getParentInstance in interface ILinkedResource
      Returns:
      A IWorkflowInstance object.
    • fromMap

      public void fromMap(Map map)
    • toMap

      public Map toMap()
    • getDocument

      public com.axemble.vdp.ui.core.document.GenericDocument getDocument()
      Returns:
      the document
    • refresh

      public void refresh()
      Description copied from interface: IResource
      Refresh all children values cache
      Specified by:
      refresh in interface IResource
    • refresh

      public void refresh(String propertyName)
      Description copied from interface: IResource
      Refresh children cache for given property
      Specified by:
      refresh in interface IResource
      Parameters:
      propertyName -
    • getText

      public Object getText(String propertyName)
      Specified by:
      getText in interface IResource
      Parameters:
      propertyName - The system name of the property.
      Returns:
      A java.util.Collection of String labels objects.