Class StandardPersistedCollectionService

java.lang.Object
wt.services.StandardManager
com.ptc.core.percol.StandardPersistedCollectionService
All Implemented Interfaces:
Serializable, PersistedCollectionService, wt.fc._NetFactor, NetFactor, wt.services.Manager

public final class StandardPersistedCollectionService extends StandardManager implements PersistedCollectionService
This is the standard implementation of the persisted collection service interfaces.

Use the newStandardPersistedCollectionService static factory method(s), not the StandardPersistedCollectionService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
  • Method Details

    • countDirectMembers

      public int countDirectMembers(PersistedCollectionHolder holder) throws WTException
      Count the number of direct members of a persisted collection holder.

      Supported API: true
      Specified by:
      countDirectMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose count is to be returned.
      Returns:
      Count of direct members from the latest check in. Does not include nested members.
      Throws:
      WTException - the wT exception
    • countAllMembers

      public int countAllMembers(PersistedCollectionHolder holder) throws WTException
      Count the number of all members of a persisted collection holder.

      Supported API: true
      Specified by:
      countAllMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose count is to be returned.
      Returns:
      Count of all members from the latest check in. Includes direct and nested members.
      Throws:
      WTException - the wT exception
    • hasMembers

      public boolean hasMembers(PersistedCollectionHolder holder) throws WTException
      Determines if a persisted collection holder has members.

      Supported API: true
      Specified by:
      hasMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object.
      Returns:
      True if holder contains one or more members from the latest check in, false if not.
      Throws:
      WTException - the wT exception
    • hasDirectMemberAccess

      public boolean hasDirectMemberAccess(PersistedCollectionHolder holder) throws WTException
      Determine if the current principal has read access to direct members of a holder.

      Supported API: true
      Specified by:
      hasDirectMemberAccess in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object.
      Returns:
      True if the current principal has read permission for direct checked in members (does not include nested members), false if the principal lacks read permissions for one or more direct checked in members.
      Throws:
      WTException - the wT exception
    • hasAllMemberAccess

      public boolean hasAllMemberAccess(PersistedCollectionHolder holder) throws WTException
      Determine if the current principal has read access to all members of a holder.

      Supported API: true
      Specified by:
      hasAllMemberAccess in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object.
      Returns:
      True if the current principal has read permission for all checked in members (including nested members), false if the principal lacks read permissions for one or more checked in members.
      Throws:
      WTException - the wT exception
    • countSeeds

      public int countSeeds(PersistedCollectionHolder holder) throws WTException
      Count the number of seeds of a persisted collection holder.

      Supported API: true
      Specified by:
      countSeeds in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose count is to be returned.
      Returns:
      Count of seeds from the latest check in.
      Throws:
      WTException - the wT exception
    • hasSeeds

      public boolean hasSeeds(PersistedCollectionHolder holder) throws WTException
      Determines if a persisted collection holder has seeds.

      Supported API: true
      Specified by:
      hasSeeds in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object.
      Returns:
      True if holder contains one or more seeds from the latest check in, false if not.
      Throws:
      WTException - the wT exception
    • hasSeedAccess

      public boolean hasSeedAccess(PersistedCollectionHolder holder) throws WTException
      Determine if the current principal has read access to all seeds of a holder.

      Supported API: true
      Specified by:
      hasSeedAccess in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object.
      Returns:
      True if the principal has the specified permissions for all checked in seeds, false if the principal lacks the specified permissions for one or more checked in seeds.
      Throws:
      WTException - the wT exception
    • getSeeds

      public WTSet getSeeds(PersistedCollectionHolder holder) throws WTException
      Get deflated references to seeds of a persisted collection.

      Supported API: true
      Specified by:
      getSeeds in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose seed references are to be returned.
      Returns:
      Set of deflated Persistable references from the latest check in. Does not include nested seeds (i.e., seeds of nested collections). If no seeds are found then the returned set will be empty, but not null. The returned references are not checked for READ access.
      Throws:
      WTException - the wT exception
    • getSeeds

      public WTSet getSeeds(PersistedCollectionHolder holder, Boolean haveReadAccess) throws WTException
      Get deflated references to seeds of a persisted collection.

      Supported API: true
      Specified by:
      getSeeds in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose seed references are to be returned. Changes to holder object must be persisted prior to calling this method.
      haveReadAccess - Controls READ access checks for the current principal. Set true to return only members having READ access, false to return only members lacking READ access, or null to skip access check.
      Returns:
      Set of deflated Persistable references from the latest check in. Does not include nested seeds (i.e., seeds of nested collections). If no seeds are found then the returned set will be empty, but not null.
      Throws:
      WTException - the wT exception
    • getCheckedOutSeeds

      public WTSet getCheckedOutSeeds(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Get deflated references to seeds of a checked out persisted collection.

      Supported API: true
      Specified by:
      getCheckedOutSeeds in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose seed references are to be returned.
      Returns:
      Set of Persistable references from the current state of a checked out collection. Reflects the additions and removals made since the collection was checked out. Does not include nested seeds (i.e., seeds of nested collections). If no seeds are found then the returned set will be empty, but not null. The returned references are not checked for READ access.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - Thrown if persisted collection is not checked out.
    • getCheckedOutSeeds

      public WTSet getCheckedOutSeeds(PersistedCollectionHolder holder, Boolean haveReadAccess) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Get deflated references to seeds of a checked out persisted collection.

      Supported API: true
      Specified by:
      getCheckedOutSeeds in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose seed references are to be returned.
      haveReadAccess - Controls READ access checks for the current principal. Set true to return only members having READ access, false to return only members lacking READ access, or null to skip access check.
      Returns:
      Set of Persistable references from the current state of a checked out collection. Reflects the additions and removals made since the collection was checked out. Does not include nested seeds (i.e., seeds of nested collections). If no seeds are found then the returned set will be empty, but not null.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - Thrown if persisted collection is not checked out.
    • getDirectMembers

      public WTSet getDirectMembers(PersistedCollectionHolder holder) throws WTException
      Get deflated references to direct members of a persisted collection.

      Supported API: true
      Specified by:
      getDirectMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose member references are to be returned.
      Returns:
      Set of deflated Persistable references from the latest check in. Does not include nested members (i.e., members of nested collections). If no members are found then the returned set will be empty, but not null. The returned references are not checked for READ access.
      Throws:
      WTException - the wT exception
    • getDirectMembers

      public WTSet getDirectMembers(PersistedCollectionMemberSelector memberSelector) throws WTException
      Get deflated references to direct members of a persisted collection.

      Supported API: true
      Specified by:
      getDirectMembers in interface PersistedCollectionService
      Parameters:
      memberSelector - PersistedCollectionMemberSelector object with options to specify which members are returned.
      Returns:
      Set of deflated Persistable references from the latest check in. Does not include nested members (i.e., members of nested collections). If no members are found then the returned set will be empty, but not null.
      Throws:
      WTException - the wT exception
    • getAllMembers

      public WTSet getAllMembers(PersistedCollectionHolder holder) throws WTException
      Get deflated references to all members of a persisted collection.

      Supported API: true
      Specified by:
      getAllMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose member references are to be returned.
      Returns:
      Set of deflated Persistable references from the latest check in. Includes all direct and nested members. If no members are found then the returned set will be empty, but not null. The returned references are not checked for READ access.
      Throws:
      WTException - the wT exception
    • getAllMembers

      public WTSet getAllMembers(PersistedCollectionMemberSelector memberSelector) throws WTException
      Get deflated references to all members of a persisted collection.

      Supported API: true
      Specified by:
      getAllMembers in interface PersistedCollectionService
      Parameters:
      memberSelector - PersistedCollectionMemberSelector object with options to specify which members are returned.
      Returns:
      Set of deflated Persistable references from the latest check in. Includes all direct and nested members. If no members are found then the returned set will be empty, but not null.
      Throws:
      WTException - the wT exception
    • getCheckedOutMembers

      public WTSet getCheckedOutMembers(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Get deflated references to direct members of a checked out persisted collection.

      Supported API: true
      Specified by:
      getCheckedOutMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose member references are to be returned.
      Returns:
      Set of Persistable references from the current state of a checked out collection. Reflects the additions and removals made since the collection was checked out. Does not include nested members (i.e., members of nested collections). If no members are found then the returned set will be empty, but not null. The returned references are not checked for READ access.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - Thrown if persisted collection is not checked out.
    • getCheckedOutMembers

      public WTSet getCheckedOutMembers(PersistedCollectionHolder holder, Boolean haveReadAccess) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Get deflated references to direct members of a checked out persisted collection.

      Supported API: true
      Specified by:
      getCheckedOutMembers in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object whose member references are to be returned.
      haveReadAccess - Controls READ access checks for the current principal. Set true to return only members having READ access, false to return only members lacking READ access, or null to skip access check.
      Returns:
      Set of Persistable references from the current state of a checked out collection. Reflects the additions and removals made since the collection was checked out. Does not include nested members (i.e., members of nested collections). If no members are found then the returned set will be empty, but not null.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - Thrown if persisted collection is not checked out.
    • hasNestedCollection

      public boolean hasNestedCollection(PersistedCollectionHolder holder) throws WTException
      Determine if a persisted collection has one or more nested collection members.

      Supported API: true
      Specified by:
      hasNestedCollection in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object.
      Returns:
      True if the latest check of the specified persisted collection has one or more nested collections (from latest check in), false if no nested collection members.
      Throws:
      WTException - the wT exception
    • haveNestedCollections

      public WTSet haveNestedCollections(WTCollection holders) throws WTException
      Determine which persisted collections have nested collection members.

      Supported API: true
      Specified by:
      haveNestedCollections in interface PersistedCollectionService
      Parameters:
      holders - Collection of holders to have their memberships checked for nested members.
      Returns:
      Subset of inflated PersistedCollectionHolder objects from the input collection that have one or more nested collection members (from their latest check ins). If no nested members are found then the returned set will be empty, but not null.
      Throws:
      WTException - the wT exception
    • checkout

      public PersistedCollectionHolder checkout(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Check out a persisted collection holder.

      Supported API: true
      Specified by:
      checkout in interface PersistedCollectionService
      Parameters:
      holder - Holder to be checked out. Changes to holder object must be persisted prior to calling this method.
      Returns:
      Updated holder object.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • checkout

      public WTCollection checkout(WTCollection holders) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Check out a collection of persisted collection holders.

      Supported API: true
      Specified by:
      checkout in interface PersistedCollectionService
      Parameters:
      holders - Collection of holders to be checked out. Changes to holder objects must be persisted prior to calling this method.
      Returns:
      Collection of updated holder objects.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • checkin

      public PersistedCollectionHolder checkin(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Check in a persisted collection holder.

      Supported API: true
      Specified by:
      checkin in interface PersistedCollectionService
      Parameters:
      holder - Holder to be checked in. Changes to holder object must be persisted prior to calling this method.
      Returns:
      Updated holder object.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • checkin

      public WTCollection checkin(WTCollection holders) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Check in a collection of persisted collection holders.

      Supported API: true
      Specified by:
      checkin in interface PersistedCollectionService
      Parameters:
      holders - Collection of holders to be checked in. Changes to holder objects must be persisted prior to calling this method.
      Returns:
      Collection of updated holder objects.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • undoCheckout

      public PersistedCollectionHolder undoCheckout(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Undo the check out of a persisted collection holder. All changed made to the persisted collection holder during the check out session are lost.

      Supported API: true
      Specified by:
      undoCheckout in interface PersistedCollectionService
      Parameters:
      holder - Holder to be have its check out undone. Changes to holder object must be persisted prior to calling this method.
      Returns:
      Updated holder object.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • undoCheckout

      public WTCollection undoCheckout(WTCollection holders) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Undo the check out of a collection of persisted collection holders. All changes made to the persisted collection holders during the check out sessions are lost.

      Supported API: true
      Specified by:
      undoCheckout in interface PersistedCollectionService
      Parameters:
      holders - Collection of holders to have their check outs undone. Changes to holder objects must be persisted prior to calling this method.
      Returns:
      Collection of updated holder objects.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • addSeed

      public void addSeed(PersistedCollectionHolder holder, Persistable seed) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Add a seed to a checked out persisted collection holder.

      Supported API: true
      Specified by:
      addSeed in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      seed - Persistable object to be added. Objects already in the persisted collection will be ignored.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • addSeeds

      public void addSeeds(PersistedCollectionHolder holder, WTCollection seeds) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Add seeds to a checked out persisted collection holder.

      Supported API: true
      Specified by:
      addSeeds in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      seeds - Collection of Persistable objects to be added. Objects already in the persisted collection will be ignored.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • removeSeed

      public void removeSeed(PersistedCollectionHolder holder, Persistable seed) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Remove a seed from a checked out persisted collection holder.

      Supported API: true
      Specified by:
      removeSeed in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      seed - the seed
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • removeSeeds

      public void removeSeeds(PersistedCollectionHolder holder, WTCollection seeds) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Remove seeds from a checked out persisted collection holder.

      Supported API: true
      Specified by:
      removeSeeds in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      seeds - Persistable seeds to be removed. Objects not in the persisted collection will be ignored.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • removeAllSeeds

      public void removeAllSeeds(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Remove all seeds from a checked out persisted collection holder.

      Supported API: true
      Specified by:
      removeAllSeeds in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • addMember

      public void addMember(PersistedCollectionHolder holder, Persistable member) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Add a member to a checked out persisted collection holder.

      Supported API: true
      Specified by:
      addMember in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      member - Persistable object to be added (must be PersistedCollectable for PersistedCollectableHolder). Objects already in the persisted collection will be ignored.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • addMembers

      public void addMembers(PersistedCollectionHolder holder, WTCollection members) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Add members to a checked out persisted collection holder.

      Supported API: true
      Specified by:
      addMembers in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      members - Collection of Persistable objects to be added (must be PersistedCollectable for PersistedCollectableHolder, will not be inflated). Objects already in the persisted collection will be ignored.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • removeMember

      public void removeMember(PersistedCollectionHolder holder, Persistable member) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Remove a member from a checked out persisted collection holder.

      Supported API: true
      Specified by:
      removeMember in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      member - the member
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • removeMembers

      public void removeMembers(PersistedCollectionHolder holder, WTCollection members) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Remove members from a checked out persisted collection holder.

      Supported API: true
      Specified by:
      removeMembers in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      members - Collection of Persistable objects to be removed (must be PersistedCollectable for PersistedCollectableHolder, will not be inflated). Objects not in the persisted collection will be ignored.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • removeAllMembers

      public void removeAllMembers(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Remove all members from a checked out persisted collection holder.

      Supported API: true
      Specified by:
      removeAllMembers in interface PersistedCollectionService
      Parameters:
      holder - Holder object (must be checked out before calling). Changes to holder object must be persisted prior to calling this method.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - the persisted collection exception
    • getCheckoutPrincipal

      public WTPrincipal getCheckoutPrincipal(PersistedCollectionHolder holder) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Get the principal that checked out the persisted collection holder.

      Supported API: true
      Specified by:
      getCheckoutPrincipal in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectionHolder object (must be checked out).
      Returns:
      WTPrincipal that checked out the holder.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - Thrown if holder is not checked out.
    • getMemberGraph

      public PersistedCollectionMemberGraph getMemberGraph(PersistedCollectableHolder holder, AssociationDisplayAssistant displayAssistant) throws WTException, wt.facade.persistedcollection.PersistedCollectionException
      Get a graph of the collected members of a persisted collectable holder. The graph gives the parent-child relationships used by collector to navigate to the members. The graph may have multiple roots, corresponding to multiple seed objects. Each parent-child relationship in the graph has a role key to indicate how the collector navigated from the parent to the child object. May only be called for holders that store soft filtering data.

      Supported API: true
      Specified by:
      getMemberGraph in interface PersistedCollectionService
      Parameters:
      holder - PersistedCollectableHolder for which to get the collected member graph.
      displayAssistant - AssociationDisplayAssistant used to used to obtain localized display values for the roles keys stored in the member graph (null for default display assistant).
      Returns:
      Graph of all collected members in the holder. Object references in the member graph will initially be deflated.
      Throws:
      WTException - the wT exception
      wt.facade.persistedcollection.PersistedCollectionException - Thrown when called for a holder that does not store soft filtering data.
      See Also:
    • isRefreshExecutingInBackground

      public boolean isRefreshExecutingInBackground(ObjectReference objRef) throws WTException, IllegalArgumentException, NullPointerException
      Determines if the passed in PersistedCollectionHolder currently has a refresh executing or pending execution on a collector-based refresh queue. Returns true if a pending refresh task exists; returns false otherwise

      Supported API: true
      Specified by:
      isRefreshExecutingInBackground in interface PersistedCollectionService
      Parameters:
      objRef - reference to PersistedCollectionHolder to check
      Returns:
      true if refresh task exists for the holder, false if not
      Throws:
      WTException
      IllegalArgumentException - if reference is not to a PersistedCollectionHolder
      NullPointerException - if reference parameter is null