Class ProcessResource

All Implemented Interfaces:
IElement, IResource, SDKWrapper, IDeletionSupport, IProtocolSupport, ISearchSupport, ISecuritySupport, com.axemble.vdp.resource.interfaces.InternalResource, Serializable
Direct Known Subclasses:
ProcessLinkedResource, ProcessStorageResource, ProcessWorkflowInstance

public class ProcessResource extends ProcessElement implements com.axemble.vdp.resource.interfaces.InternalResource, SDKWrapper
Author:
vlygeros
See Also:
  • Field Details

    • document

      protected com.axemble.vdp.ui.core.document.CoreDocument document
  • Constructor Details

    • ProcessResource

      protected ProcessResource(IModule module)
    • ProcessResource

      protected ProcessResource(IModule module, com.axemble.vdp.ui.core.document.CoreDocument document)
  • Method Details

    • getId

      public IStorageKey getId()
      Description copied from interface: IElement
      Gets the identifier object.
      Specified by:
      getId in interface IElement
      Overrides:
      getId in class ProcessElement
      Returns:
      a IStorageKey object.
    • getNativeObject

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

      public com.axemble.vdoc.core.domain.BaseDomain getNativeDomain()
      Specified by:
      getNativeDomain in interface SDKWrapper
    • getDocument

      public com.axemble.vdp.ui.core.document.CoreDocument getDocument()
    • getCreatedDate

      public Date getCreatedDate()
      Description copied from interface: IResource
      Gets the created date.
      Specified by:
      getCreatedDate in interface IResource
      Returns:
      a Date object.
    • 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.
    • getModifiedDate

      public Date getModifiedDate()
      Description copied from interface: IResource
      Gets the modified date.
      Specified by:
      getModifiedDate in interface IResource
      Returns:
      a Date object.
    • 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.
    • setCreatedBy

      public void setCreatedBy(IUser user)
      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:
      user - The creator IUser of the resource.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • setList

      public void setList(String propertyName, Collection<? extends IOptionList.IOption> values)
      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.
      values - A java.util.Collection of IOptionList.IOption objects..
    • getList

      public Collection<? extends IOptionList.IOption> 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.
    • 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.
    • getCatalog

      public ICatalog getCatalog()
    • 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.
    • 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<? extends ILinkedResource> 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.
    • getLinkedResources

      public Collection<? extends ILinkedResource> 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.
    • 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<? extends ILinkedResource> 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.
    • 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.
    • save

      public boolean save(IContext context)
      Description copied from interface: IElement
      Saves or updates the element.
      Specified by:
      save in interface IElement
      Overrides:
      save in class ProcessElement
      Parameters:
      context - The Execution context.
      Returns:
      return true if succeeded, false otherwise.
    • 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.
    • saveNoEvents

      public boolean saveNoEvents()
      Specified by:
      saveNoEvents in interface com.axemble.vdp.resource.interfaces.InternalResource
    • 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.
    • 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
    • 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.
    • getValues

      public com.axemble.vdoc.core.utils.IntrospectionObject getValues()
      Specified by:
      getValues in interface com.axemble.vdp.resource.interfaces.InternalResource
    • getFields

      public com.axemble.vdoc.core.utils.IntrospectionObject getFields()
      Specified by:
      getFields in interface com.axemble.vdp.resource.interfaces.InternalResource