Package wt.vc

Class StandardVersionControlService

java.lang.Object
wt.services.StandardManager
wt.vc.StandardVersionControlService
All Implemented Interfaces:
Serializable, wt.fc._NetFactor, NetFactor, wt.services.Manager, VersionControlService

public class StandardVersionControlService extends StandardManager implements VersionControlService, Serializable
Provides the standard implementation of server-side functionality as defined by the VersionControlService interface. This class is the one intended to be extended to enhance functionality.

As defined by the standard versioning service's access control rules, there are no constraints placed on the access of iterated/versioned objects. Furthermore, there are no constraints placed on the access of either mastered objects. Warning: direct manipulation or deletion of masters is currently unsupported. All functions should be carried out on iterated/versioned objects.

Event-based processing is performed on business objects asserted as being Iterated/Versioned during database storing, deletions, and full restorations. After a successful store, the versioning service listens to a dispatched event indicating that the store has completed and signals all other interested services that a new iteration exists. When a business object is being deleted from the database, the versioning service listens to a dispatched event indicating that the deletion is about to commence and vetos the deletion if the version is not the latest one (i.e., has no successor). Otherwise, it passes on vetoing the deletion. After a successful deletion, the versioning service listens to a dispatched event indicating that the delete has completed and deletes all of the version's iterations. If it turns out that the deleted version is the only one remaining related to a master then it gets deleted as well. When a business object is being fully restored from the database, the versioning service listens to a dispatched event indicating that the full restoration is beginning and restores the version cookie's predecessor reference, and restores the iteration cookie's creator, prececessor, and master references.

Use the newStandardVersionControlService static factory method(s), not the StandardVersionControlService 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

    • newVersionable

      protected Versionable newVersionable(Versionable originalVersion, boolean allowNonLatestRevise) throws WTException
      API intended to be called internally by any API that intends to create a new version. It creates a new in-line version (with a new branch identifier), resets the iteration identifier, and assigns the version creator.

      Supported API: true
      Parameters:
      originalVersion -
      allowNonLatestRevise - If true will allow a non-latest revise if enabled for system.
      Returns:
      Versionable
      Throws:
      WTException
    • newVersionables

      protected WTList newVersionables(WTList versions, boolean allowNonLatestRevise) throws WTException
      API intended to be called internally by any API that intends to create a new version. It creates a new in-line version (with a new branch identifier), resets the iteration identifier, and assigns the version creator.

      Supported API: true
      Parameters:
      versions -
      allowNonLatestRevise -
      Returns:
      WTList
      Throws:
      WTException