wt.inf.sharing
Interface DataSharingService

All Known Implementing Classes:
DataSharingServiceFwd, StandardDataSharingService

public interface DataSharingService

Client accessible data sharing API. Include methods to create, query and manipulate information about shared data.

Supported API: false

Extendable: false


Method Summary
 WTContainer disableContainerSharing(WTContainer container)
          Disables data sharing in which the wt.inf.WTContainer passed as argument is the source of the data to be shared.
 void disableShare(Persistable object, WTContainerRef container_ref)
          Disables all wt,inf.sharing.SharedContainerMap for the target object and target container pased as arguments.
 void disableShare(SharedContainerMap map)
          Disables all wt,inf.sharing.SharedContainerMap with the same key and target container as the one passed as argument.
 WTContainer enableContainerSharing(WTContainer container)
          Enables data sharing in which the wt.inf.WTContainer passed as argument is the source of the data to be shared.
 void enableShare(Persistable object, WTContainerRef container_ref)
          Enables all wt,inf.sharing.SharedContainerMap for the target object and target container pased as arguments.
 void enableShare(SharedContainerMap map)
          Enables all wt,inf.sharing.SharedContainerMap with the same key and target container as the one passed as argument.
 WTCollection getAllShareMaps(WTCollection objects, WTContainerRef container_ref, int enabled_status)
          Returns the object and version share maps for the collection of object and target container passed as parameter in the given sharing state (enabled/disabled).
 QueryResult getClassObjects(Class obj_class, WTContainerRef container_ref)
          Gets all objects of the given class to the container passed as argument.
 QueryResult getContainerMaps(WTContainerRef from_container_ref, WTContainerRef to_container_ref, int enabled_status)
          Given a target container, returns all the objects shared by the container.
 QueryResult getKeyMaps(long share_key, WTContainerRef container_ref, int enabled_status)
          Returns all sharing maps that have the key passed as argument.
 QueryResult getMaps(WTContainerRef container_ref, boolean not_checked_out)
          Returns all enabled maps (SharedContainerMap) for which the target share is the container whose reference is passed as argument.
 SharedContainerMap getObjectKeyMap(long share_key, Persistable object, int enabled_status)
          Returns the map for a given key, object and sharing status.
 QueryResult getObjectMaps(Object object, WTContainerRef container_ref, int enabled_status)
          Returns sharing map for the object and container passed as parameter if it is in the given sharing state (enabled/disabled).
 WTCollection getObjectShareMaps(WTCollection objects, WTContainerRef container_ref, int enabled_status)
          Returns the object share maps for the collection of object and target container passed as parameter in the given sharing state (enabled/disabled).
 SortedEnumeration getSharedFolderContents(Folder folder)
          Returns shared contents given a folder.
 WTCollection getSharedFolderContents(Folder folder, ConfigSpec config_spec, Class[] obj_classes)
          Returns shared folder content given a Folder and a {@link wt.config.ConfigSpec).
 WTCollection getSharedObjects(WTCollection objects, WTContainerRef container_ref)
          Returns a WTCollection of objects contained in the collection passed as argument and are shared to a container, given its reference.
 long getShareKey(Persistable object, WTContainerRef to_container_ref)
          Returns the share key for the object and container passed as arguments.
 WTCollection getVersionShareMaps(WTCollection objects, WTContainerRef container_ref, int enabled_status)
          Returns the version share maps for the collection of object and target container passed as parameter in the given sharing state (enabled/disabled).
 boolean isShareable(Persistable object)
          Determines if the Persistable can be shared.
 boolean isSharedTo(Persistable object, WTContainerRef container_ref)
          Determines if the object is shared to the container whose reference is passed as argument.
 void removeShare(Persistable object, WTContainerRef container_ref)
          Removes all wt,inf.sharing.SharedContainerMap for the target object and target container pased as arguments.
 void removeShare(SharedContainerMap map)
          Removes all wt,inf.sharing.SharedContainerMap with the same key and target container as the one passed as argument.
 void removeShares(List shares)
          Removes all wt,inf.sharing.SharedContainerMap contained in the list passed as argument.
 void removeShares(WTCollection shares)
          Removes all wt,inf.sharing.SharedContainerMap contained in the collection passed as argument.
 SharedContainerMap shareFolder(Folder folder, WTContainerRef to_container_ref, Folder to_folder)
          Share the folder passed as argument and all contained objects ("folder set").
 SharedContainerMap shareObject(Persistable object, WTContainerRef to_container_ref, Folder to_folder)
          Shares an object given the target container and the target folder.
 QueryResult shareObjectList(List objects, WTContainerRef to_container_ref, Folder to_folder)
          Share a list of objects given the target container and the target folder.
 SharedContainerMap shareStructure(Persistable struct_handle, WTContainerRef to_container_ref, Folder to_folder)
          Shares a structure through the handle passed as argument.
 SharedContainerMap shareVersion(Persistable object, WTContainerRef to_container_ref, Folder to_folder)
          Shares an object given the target container and the target folder.
 QueryResult shareVersionList(List objects, WTContainerRef to_container_ref, Folder to_folder)
          Share a list of objects given the target container and the target folder.
 WTCollection shareVersions(WTCollection objects, WTContainerRef to_container_ref, Folder to_folder)
          Shares a WTCollection given the target container and the target folder.
 void switchShare(Persistable object1, WTContainerRef container_ref, Persistable object2)
          Replaces an object for another in a share map for a given target container.
 void undoShares(WTCollection objects, WTContainerRef container_ref)
          Removes all the object and version share maps for the collection of objects and target container passed as parameters in either sharing state.
 

Method Detail

disableContainerSharing

public WTContainer disableContainerSharing(WTContainer container)
                                    throws WTException
Disables data sharing in which the wt.inf.WTContainer passed as argument is the source of the data to be shared. If the container has previously enabled data sharing, all the sharings are disabled.

Supported API: false

Parameters:
container -
Returns:
WTContainer
Throws:
WTException

disableShare

public void disableShare(SharedContainerMap map)
                  throws WTException
Disables all wt,inf.sharing.SharedContainerMap with the same key and target container as the one passed as argument.

Supported API: false

Parameters:
map -
Throws:
WTException

disableShare

public void disableShare(Persistable object,
                         WTContainerRef container_ref)
                  throws WTException
Disables all wt,inf.sharing.SharedContainerMap for the target object and target container pased as arguments. Disables both object and version shares.

NoteIf the share exists and is a COLLECTIVE, FOLDER or STRUCTURE share, then all related shares are disabled.

Supported API: false

Parameters:
object -
container_ref -
Throws:
WTException

enableContainerSharing

public WTContainer enableContainerSharing(WTContainer container)
                                   throws WTException
Enables data sharing in which the wt.inf.WTContainer passed as argument is the source of the data to be shared. If the container has previously disabled data sharing, all the sharings are re-enabled.

Supported API: false

Parameters:
container -
Returns:
WTContainer
Throws:
WTException

enableShare

public void enableShare(SharedContainerMap map)
                 throws WTException
Enables all wt,inf.sharing.SharedContainerMap with the same key and target container as the one passed as argument.

Supported API: false

Parameters:
map -
Throws:
WTException

enableShare

public void enableShare(Persistable object,
                        WTContainerRef container_ref)
                 throws WTException
Enables all wt,inf.sharing.SharedContainerMap for the target object and target container pased as arguments. Enables both object and version shares.

NoteIf the share exists and is a COLLECTIVE, FOLDER or STRUCTURE share, then all related shares are enabled.

Supported API: false

Parameters:
object -
container_ref -
Throws:
WTException

getClassObjects

public QueryResult getClassObjects(Class obj_class,
                                   WTContainerRef container_ref)
                            throws WTException
Gets all objects of the given class to the container passed as argument.

Supported API: false

Parameters:
obj_class -
container_ref -
Returns:
QueryResult
Throws:
WTException

getContainerMaps

public QueryResult getContainerMaps(WTContainerRef from_container_ref,
                                    WTContainerRef to_container_ref,
                                    int enabled_status)
                             throws WTException
Given a target container, returns all the objects shared by the container.

Supported API: false

Parameters:
from_container_ref -
to_container_ref -
enabled_status -
Returns:
QueryResult
Throws:
WTException

getKeyMaps

public QueryResult getKeyMaps(long share_key,
                              WTContainerRef container_ref,
                              int enabled_status)
                       throws WTException
Returns all sharing maps that have the key passed as argument.

Supported API: false

Parameters:
share_key -
container_ref -
enabled_status -
Returns:
QueryResult
Throws:
WTException

getMaps

public QueryResult getMaps(WTContainerRef container_ref,
                           boolean not_checked_out)
                    throws WTException
Returns all enabled maps (SharedContainerMap) for which the target share is the container whose reference is passed as argument. Maps for objects checked out to the container are not included if the value of the 'not_checked_out' argument is true. Otherwise all maps are returned.

Supported API: false

Parameters:
container_ref -
not_checked_out -
Returns:
QueryResult
Throws:
WTException

getObjectKeyMap

public SharedContainerMap getObjectKeyMap(long share_key,
                                          Persistable object,
                                          int enabled_status)
                                   throws WTException
Returns the map for a given key, object and sharing status. Returns 'null' if there is no such map.

Supported API: false

Parameters:
share_key -
object -
enabled_status -
Returns:
SharedContainerMap
Throws:
WTException

getObjectMaps

public QueryResult getObjectMaps(Object object,
                                 WTContainerRef container_ref,
                                 int enabled_status)
                          throws WTException
Returns sharing map for the object and container passed as parameter if it is in the given sharing state (enabled/disabled). The integer constants indicating whether only enabled, only disabled or both kinds of shares are to be retruned are defined in DataSharingHelper. They are the following: The object passed as argument may be a Persistable, an object identifier or a Long. If a Persistable is passed as argument, both object and version shares are returned. If an ObjectIdentifier is passed as argument, only object shares are retuned. Finally, if a Long is passed as argument, only version shares are returned. The Long in question is interpreted as the branch id of the object.

Supported API: false

Parameters:
object -
container_ref -
enabled_status -
Returns:
QueryResult
Throws:
WTException

getSharedFolderContents

public SortedEnumeration getSharedFolderContents(Folder folder)
                                          throws WTException
Returns shared contents given a folder. The output is a SortedEnumeration.

Supported API: false

Parameters:
folder -
Returns:
SortedEnumeration
Throws:
WTException

getShareKey

public long getShareKey(Persistable object,
                        WTContainerRef to_container_ref)
                 throws WTException
Returns the share key for the object and container passed as arguments. Returns null if the object is not shared by the container or the share key is 'null.'

Supported API: false

Parameters:
object -
to_container_ref -
Returns:
long
Throws:
WTException

isShareable

public boolean isShareable(Persistable object)
                    throws WTException
Determines if the Persistable can be shared. Returns true if:

Supported API: false

Parameters:
object -
Returns:
boolean
Throws:
WTException

isSharedTo

public boolean isSharedTo(Persistable object,
                          WTContainerRef container_ref)
                   throws WTException
Determines if the object is shared to the container whose reference is passed as argument. Returns 'true' if the object is shared either as a version or not; whether or not the share is enabled; returns 'false' otherwise.

If the container reference passed as argument is 'null' then the method returns whether the object is shared to any container.

Supported API: false

Parameters:
object -
container_ref -
Returns:
boolean
Throws:
WTException

removeShare

public void removeShare(SharedContainerMap map)
                 throws WTException
Removes all wt,inf.sharing.SharedContainerMap with the same key and target container as the one passed as argument.

Supported API: false

Parameters:
map -
Throws:
WTException

removeShare

public void removeShare(Persistable object,
                        WTContainerRef container_ref)
                 throws WTException
Removes all wt,inf.sharing.SharedContainerMap for the target object and target container pased as arguments. Removes both object and version shares, enabled or disabled shares.

NoteIf the share exists and is a COLLECTIVE, FOLDER or STRUCTURE share, then all related shares are removed.

Supported API: false

Parameters:
object -
container_ref -
Throws:
WTException

removeShares

public void removeShares(List shares)
                  throws WTException
Removes all wt,inf.sharing.SharedContainerMap contained in the list passed as argument.

Supported API: false

Parameters:
shares -
Throws:
WTException

shareFolder

public SharedContainerMap shareFolder(Folder folder,
                                      WTContainerRef to_container_ref,
                                      Folder to_folder)
                               throws WTException
Share the folder passed as argument and all contained objects ("folder set"). The contained iterated objects in the list are shared as versions. Returns the SharedContainerMap for the shared folder. The target folder may not be null. The share key of the objects in the folder set the String representation of the reference to the shared folder.

The way the operation deals with duplicate shares is as follows:

Where an equivalent share is one with same target object and container: same ûmodeú (version/object); same target folder. A conflicting share is one with same target object and container but has either a different mode or a different folder.

Supported API: false

Parameters:
folder -
to_container_ref -
to_folder -
Returns:
SharedContainerMap
Throws:
WTException

shareObject

public SharedContainerMap shareObject(Persistable object,
                                      WTContainerRef to_container_ref,
                                      Folder to_folder)
                               throws WTException
Shares an object given the target container and the target folder. The object shared is the specific one passed as argument. So, if the object is Iterated, then the specific iteration passed as argument is shared. Returns a wt.inf.SharedContainerMap object representing the sharing of the data.

The way the operation deals with duplicate shares is as follows:

Where an equivalent share is one with same target object and container: same ûmodeú (version/object); same target folder. A conflicting share is one with same target object and container but has either a different mode or a different folder.

Supported API: false

Parameters:
object -
to_container_ref -
to_folder -
Returns:
SharedContainerMap
Throws:
WTException
See Also:
Iterated, WTContainer, Folder, wt.sharing.SharedContainerMap

shareObjectList

public QueryResult shareObjectList(List objects,
                                   WTContainerRef to_container_ref,
                                   Folder to_folder)
                            throws WTException
Share a list of objects given the target container and the target folder. The specific iterations of the objects are shared if the object is Iterated. Returns a list of SharedContainerMap representing the sharing of the objects. The target folder may be null. All the sharings will tagged as belonging to the same action. This means that the remove/disable/enable operations affect all objects in the set. The share key for the maps is the String representation of the reference to the first object in the list passed as argument.

Supported API: false

Parameters:
objects -
to_container_ref -
to_folder -
Returns:
QueryResult
Throws:
WTException
See Also:
Iterated, WTContainer, Folder, wt.sharing.SharedContainerMap, wt.sharing.DataSharingService#shareObject

shareStructure

public SharedContainerMap shareStructure(Persistable struct_handle,
                                         WTContainerRef to_container_ref,
                                         Folder to_folder)
                                  throws WTException
Shares a structure through the handle passed as argument. A structure delegate is called to return the objects contained in the structure. Returns the SharedContainerMap for the shared structure handle. The target folder may be null. The share key of the objects in the folder set the String representation of the reference to the shared structure handle.

Supported API: false

Parameters:
struct_handle -
to_container_ref -
to_folder -
Returns:
SharedContainerMap
Throws:
WTException

shareVersion

public SharedContainerMap shareVersion(Persistable object,
                                       WTContainerRef to_container_ref,
                                       Folder to_folder)
                                throws WTException
Shares an object given the target container and the target folder. If the object is Iterated, then a version is shared, otherwise an instance is shared. Returns a wt.inf.SharedContainerMap object representing the sharing of the data.

The way the operation deals with duplicate shares is as follows:

Where an equivalent share is one with same target object and container: same ûmodeú (version/object); same target folder. A conflicting share is one with same target object and container but has either a different mode or a different folder.

Supported API: false

Parameters:
object -
to_container_ref -
to_folder -
Returns:
SharedContainerMap
Throws:
WTException
See Also:
Iterated, WTContainer, Folder, wt.sharing.SharedContainerMap

shareVersionList

public QueryResult shareVersionList(List objects,
                                    WTContainerRef to_container_ref,
                                    Folder to_folder)
                             throws WTException
Share a list of objects given the target container and the target folder. The iterated objects in the list are shared as versions and the non-iterated as objects. Returns a list of SharedContainerMap representing the sharing of the objects. The target folder may be null. All the sharings will tagged as belonging to the same action. This means that the remove/disable/enable operations affect all objects in the set. The share key for the maps is the String representation of the reference to the first object in the list passed as argument.

Supported API: false

Parameters:
objects -
to_container_ref -
to_folder -
Returns:
QueryResult
Throws:
WTException

shareVersions

public WTCollection shareVersions(WTCollection objects,
                                  WTContainerRef to_container_ref,
                                  Folder to_folder)
                           throws WTException
Shares a WTCollection given the target container and the target folder. Returns a collection of SharedContainerMap representing the sharing of the objects. The objects in the input collection are not assumed to be Iterated. For the ones that are version shares are created; for the others, object shares. The shares are not assumed to belong to the same action. This means that they can be removed/disabled/enabled independently.

Supported API: false

Parameters:
objects -
to_container_ref -
to_folder -
Returns:
WTCollection
Throws:
WTException

switchShare

public void switchShare(Persistable object1,
                        WTContainerRef container_ref,
                        Persistable object2)
                 throws WTException
Replaces an object for another in a share map for a given target container. All ACL entries due to the share are removed from old target to the new target object.

Supported API: false

Parameters:
object1 -
container_ref -
object2 -
Throws:
WTException

getObjectShareMaps

public WTCollection getObjectShareMaps(WTCollection objects,
                                       WTContainerRef container_ref,
                                       int enabled_status)
                                throws WTException
Returns the object share maps for the collection of object and target container passed as parameter in the given sharing state (enabled/disabled). The integer constants indicating whether only enabled, only disabled or both kinds of shares are to be retruned are defined in DataSharingHelper. They are the following:

Supported API: false

Parameters:
objects -
container_ref -
enabled_status -
Returns:
WTCollection
Throws:
WTException

getVersionShareMaps

public WTCollection getVersionShareMaps(WTCollection objects,
                                        WTContainerRef container_ref,
                                        int enabled_status)
                                 throws WTException
Returns the version share maps for the collection of object and target container passed as parameter in the given sharing state (enabled/disabled). The integer constants indicating whether only enabled, only disabled or both kinds of shares are to be retruned are defined in DataSharingHelper. They are the following:

Supported API: false

Parameters:
objects -
container_ref -
enabled_status -
Returns:
WTCollection
Throws:
WTException

getAllShareMaps

public WTCollection getAllShareMaps(WTCollection objects,
                                    WTContainerRef container_ref,
                                    int enabled_status)
                             throws WTException
Returns the object and version share maps for the collection of object and target container passed as parameter in the given sharing state (enabled/disabled). The integer constants indicating whether only enabled, only disabled or both kinds of shares are to be retruned are defined in DataSharingHelper. They are the following:

Supported API: false

Parameters:
objects -
container_ref -
enabled_status -
Returns:
WTCollection
Throws:
WTException

removeShares

public void removeShares(WTCollection shares)
                  throws WTException
Removes all wt,inf.sharing.SharedContainerMap contained in the collection passed as argument.

Supported API: false

Parameters:
shares -
Throws:
WTException

getSharedObjects

public WTCollection getSharedObjects(WTCollection objects,
                                     WTContainerRef container_ref)
                              throws WTException
Returns a WTCollection of objects contained in the collection passed as argument and are shared to a container, given its reference. If the container reference is 'null', returns all shared objects contained in the collection passed as argument.

Supported API: false

Parameters:
objects -
container_ref -
Returns:
WTCollection
Throws:
WTException

getSharedFolderContents

public WTCollection getSharedFolderContents(Folder folder,
                                            ConfigSpec config_spec,
                                            Class[] obj_classes)
                                     throws WTException
Returns shared folder content given a Folder and a wt.config.ConfigSpec). The objects returne are of one of the classes given in the array passed as argument. The config spec passed as argument can be null, in which case it is simply ignored.

For example, to get the shared EPM contents you call mySharedObjs = getSharedFolderContents (myFolder, myConfig, new Class [] {Folder.class, EPMDocument.class, WTPart.class); Note that if you have nested folders, the folder class itself needs to be included.

Supported API: false

Parameters:
folder -
config_spec -
obj_classes -
Returns:
WTCollection
Throws:
WTException

undoShares

public void undoShares(WTCollection objects,
                       WTContainerRef container_ref)
                throws WTException
Removes all the object and version share maps for the collection of objects and target container passed as parameters in either sharing state.

Supported API: false

Parameters:
objects -
container_ref -
Throws:
WTException