Interface IThing

All Superinterfaces:
Cloneable, ICacheObjectListener, ISortInfo, IThingBaseInfo, IThingBaseView, IThingDateInfo, IThingDateView, IThingIDBase, IThingInfo, IThingInfoView, IThingKeywordsInfo, IThingNameInfo, IThingNameView, IThingNoteInfo, IThingParentInfo, IThingParentView, Serializable
All Known Subinterfaces:
IArchived, IBizPolicyData, ICategory, IContainer, IContent, IDirServiceThing, IFolder, IForm, IForum, IGroup, IHandlerData, ILink, IMechanicsData, IMessage, IPortlet, IPrincipal, IRelation, IRole, ISchedule, IServiceThing, IStyle, ITemplate, IThingComponentData, ITopic, ITopic, IUser, IWorkspace, IXType

This is the base thing interface. All things must implement it.
See Also:
  • Field Details

  • Method Details

    • deactivate

      void deactivate(IThingID deadContainer, IThingID userID) throws MetaException
      removes the thing from the UI adds a reference in the given container
      Parameters:
      deadContainer - container to move thing to
      userID - performing action
      Throws:
      MetaException
    • deactivate

      void deactivate(IThingID userID) throws MetaException
      removes the thing from the UI
      Parameters:
      userID - performing action
      Throws:
      MetaException
    • reactivate

      void reactivate(IThingID userID) throws MetaException
      restores the thing to the UI This only works if the thing was deactivated, not deleted or destroyed userID becomes the owner of the thing if not null
      Parameters:
      userID -
      Throws:
      MetaException
    • delete

      void delete(long maxAge, IThingID deadContainer, IThingID userID) throws MetaException
      removes from UI and sets time to be destroyed The next time the purger runs, this thing will be destroyed if the max age has passed.
      Parameters:
      maxAge - in millis
      deadContainer - - put a reference in this container
      userID - - user deleting thing
      Throws:
      MetaException
    • delete

      void delete(long maxAge, IThingID userID) throws MetaException
      removes from UI and sets time to be destroyed The next time the purger runs, this thing will be destroyed if the max age has passed.
      Parameters:
      maxAge - in millis
      userID - - user deleting thing
      Throws:
      MetaException
    • destroy

      void destroy() throws MetaException
      Destroy this thing. May have side-effects. can throw exception if item is "eternal" item will remove all content, subscriptions, relationships, primary children associated with this thing
      Throws:
      MetaException
    • setXTypeID

      IThingID setXTypeID(int xtype) throws MetaException
      sets the xtype. Note that this effective changes the type of the thing the xtype must be the same base type as current xtype
      Returns:
      new thingID
      Throws:
      MetaException
    • getVersionInfo

      IVersionInfo getVersionInfo() throws MetaException
      Get the Version Info object for this thing
      Returns:
      null if not versioned
      Throws:
      MetaException
    • addToContainer

      int addToContainer(IThingID thingID) throws MetaException
      Add a reference to this thing to a container. This does not affect the primary container. Use this to add things to topics, or to link an item to a folder that is not its primary container.
      Parameters:
      thingID -
      Returns:
      relTypeID of relation IRelation
      Throws:
      MetaException - if container or ID not valid
    • removeFromContainer

      void removeFromContainer(IThingID thingID) throws MetaException
      Removes a reference to this thing from a container. This does not affect the primary container.
      Throws:
      MetaException
    • relate

      void relate(IThingID thingID2, boolean fFrom, int relType) throws MetaException
      Relate one thing to another. Can not be used to create a containment relationship.
      Parameters:
      relType - Type identifier for the relationship. Must be registered via MetadataService. fFrom indicates direction of the relationship: * true means from me to the other thing * false means from the other thing to me
      Throws:
      MetaException
      See Also:
    • unrelate

      void unrelate(IThingID targetID, boolean fFrom, int relType) throws MetaException
      Remove a relationship from one thing to another. Can not be used to remove a containment relationship.
      Parameters:
      targetID -
      relType - Type identifier for the relationship does not need to be IRelation
      fFrom - indicates direction of the relationship: * true means from me to the other thing * false means from the other thing to me
      Throws:
      MetaException - if target or relation is invalid
      See Also:
    • onLoad

      @Deprecated void onLoad() throws MetaException
      Deprecated.
      for internal use
      serialization support loads all possible data for serialization
      Throws:
      MetaException
    • onSave

      @Deprecated IThingID onSave(IThingID idParent, IThingID idOwner, IMetaContext mc) throws MetaException
      Deprecated.
      for internal use
      stores all possible data as a new thing, returns new thing ID
      Throws:
      MetaException
    • copy

      IThingID copy(IThingID idParent, IThingID idOwner, IMetaContext mc) throws MetaException
      creates a new thing under parent with that owner parent, owner, and mc must be from the same datasource
      Parameters:
      idParent - parent of new thing
      idOwner - owner of new thing
      mc - meta context of new thing
      Returns:
      Throws:
      MetaException
    • hashCode

      int hashCode()
      pre-defined hash code
      Overrides:
      hashCode in class Object
    • setProperties

      DifferenceMap setProperties(Map<String,?> map) throws MetaException
      sets properties in a single SQL call (per class) returns map of changed values (for events)
      Throws:
      MetaException
    • getThingID

      IThingID getThingID()
      Returns:
      IThingID for thing
    • getTreePath

      IURI getTreePath() throws MetaException
      Returns tree path for this thing view in the form of separated dbids starting from the root folder For example 2|1001|1002|20990
      Returns:
      Throws:
      MetaException
    • loadThings

      void loadThings(IXType xtype) throws MetaException
      This is an optimization method that allows if neccessary bulk-load data for all things of this type that belong to the specified container. The implementation will be responsible for loading all thing type specific data.
      Parameters:
      containerID -
      Throws:
      MetaException