Interface IResource

All Superinterfaces:
IDeletionSupport, IElement, IProtocolSupport, ISearchSupport, ISecuritySupport, Serializable
All Known Subinterfaces:
IDataUnit, IFile, ILinkedResource, ILockSupport, IStorageResource, IVersion, IWorkflowInstance
All Known Implementing Classes:
GenericResource, PortalFile, ProcessLinkedResource, ProcessResource, ProcessStorageResource, ProcessWorkflowInstance

A base interface for resources
Since:
1.0, 15/04/2008
Author:
vlygeros
See Also:
  • Method Details

    • getName

      String getName()
      Gets the name of a resource.
      Returns:
      a string object.
    • getCreatedDate

      Date getCreatedDate()
      Gets the created date.
      Returns:
      a Date object.
    • setCreatedDate

      void setCreatedDate(Date date)
      Sets the created date.
      Parameters:
      date - The Date to set.
    • setModifiedDate

      void setModifiedDate(Date date)
      Sets the modified date.
      Parameters:
      date - The Date to set.
    • getModifiedDate

      Date getModifiedDate()
      Gets the modified date.
      Returns:
      a Date object.
    • getCreatedBy

      IUser getCreatedBy()
      Gets the creator of the resource.
      Returns:
      a IUser object.
    • setCreatedBy

      void setCreatedBy(IUser user)
      Sets the creator of the resource. Can only be set if the resource has not been created yet
      Parameters:
      user - The creator IUser of the resource.
    • setModifiedBy

      void setModifiedBy(IUser user)
      Sets last user who modified the resource.
      Parameters:
      user - The last IUser who modified the resource.
    • getModifiedBy

      IUser getModifiedBy()
      Gets the last user who modified the resource.
      Returns:
      a IUser object.
    • exists

      boolean exists(String propertyName)
      Checks if a property exists.
      Parameters:
      propertyName - The system name of the property.
      Returns:
      true if the property exists,
      invalid @link
      {@link false
      } otherwise.
    • setValue

      void setValue(String propertyName, Object value)
      Sets a value to a property
      Parameters:
      propertyName - The system name of the property.
      value - The value object to set.
    • setValueNoEvents

      void setValueNoEvents(String propertyName, Object value)
      Sets a value to a property without throwing any event.
      Parameters:
      propertyName - The system name of the property.
      value - The value object to set.
    • getValue

      Object getValue(String propertyName)
      Gets the value of a property.
      Parameters:
      propertyName - The system name of the property.
      Returns:
      an Object.
    • setList

      void setList(String propertyName, Collection<? extends IOptionList.IOption> value)
      Sets the available values for a list property.
      Parameters:
      propertyName - The system name of the property.
      value - A java.util.Collection of IOptionList.IOption objects..
    • getList

      Collection<? extends IOptionList.IOption> getList(String propertyName)
      Gets the available values of a list property.
      Parameters:
      propertyName - The system name of the property.
      Returns:
      A java.util.Collection of IOptionList.IOption.
    • getDefinition

      IResourceDefinition getDefinition()
      Gets the definition of the resource
      Returns:
      A IResourceDefinition object.
    • createLinkedResource

      ILinkedResource createLinkedResource(String propertyName)
      Creates a linked resource within a property.
      Parameters:
      propertyName - The system name of the property.
      Returns:
      a ILinkedResource object.
    • addLinkedResource

      boolean addLinkedResource(ILinkedResource linkedResource)
      Allows to add a linked resource.
      Parameters:
      linkedResource - The ILinkedResource to add.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • addLinkedResources

      boolean addLinkedResources(Collection<? extends ILinkedResource> linkedResources)
      Allows to add linked resources.
      Parameters:
      linkedResources - The collection of ILinkedResource objects to add.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • getLinkedResources

      Collection<? extends ILinkedResource> getLinkedResources(String propertyName)
      Retrieves all the linked resources of a property.
      Parameters:
      propertyName - The system name of the property.
      Returns:
      A java.util.Collection of ILinkedResource objects.
    • deleteLinkedResource

      void deleteLinkedResource(ILinkedResource linkedResource)
      Allows to remove a linked resource.
      Parameters:
      linkedResource - The ILinkedResource to remove.
    • deleteLinkedResources

      void deleteLinkedResources(Collection<? extends ILinkedResource> linkedResources)
      Allows to remove a collection of linked resources.
      Parameters:
      linkedResources - The collection of ILinkedResource objects.
    • getHistory

      IResourceHistory getHistory()
      Gets the history of the resource
      Returns:
      a IResourceHistory object.
    • allowEvents

      void allowEvents()
      Allows events to be thrown.
    • denyEvents

      void denyEvents()
      Prevents from throwing events.
    • save

      @Deprecated boolean save()
      Deprecated.
      Use save(IContext) method instead.
      Saves the resource.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • save

      boolean save(String propertyName)
      Saves a specified property.
      Parameters:
      propertyName - The system name of the property.
      Returns:
      true if succeed,
      invalid @link
      {@link false
      } otherwise.
    • refresh

      void refresh()
      Refresh all children values cache
    • refresh

      void refresh(String propertyName)
      Refresh children cache for given property
      Parameters:
      propertyName -
    • getText

      Object getText(String propertyName)
      Parameters:
      propertyName - The system name of the property.
      Returns:
      A java.util.Collection of String labels objects.