|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.inf.sharing.DataSharingServiceFwd
Client accessible data sharing API. Include methods to create, query
and manipulate information about shared data.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static String |
FC_RESOURCE
|
(package private) static boolean |
SERVER
|
Fields inherited from interface wt.method.RemoteAccess |
versionID |
Constructor Summary | |
DataSharingServiceFwd()
|
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. |
private static Manager |
getManager()
|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final boolean SERVER
private static final String FC_RESOURCE
private static final String CLASSNAME
Constructor Detail |
public DataSharingServiceFwd()
Method Detail |
private static Manager getManager() throws WTException
WTException
public WTContainer disableContainerSharing(WTContainer container) throws WTException
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.
disableContainerSharing
in interface DataSharingService
container
-
WTException
public void disableShare(SharedContainerMap map) throws WTException
wt,inf.sharing.SharedContainerMap
with the same
key and target container as the one passed as argument.
disableShare
in interface DataSharingService
map
-
WTException
public void disableShare(Persistable object, WTContainerRef container_ref) throws WTException
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
disableShare
in interface DataSharingService
object
- container_ref
-
WTException
public WTContainer enableContainerSharing(WTContainer container) throws WTException
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.
enableContainerSharing
in interface DataSharingService
container
-
WTException
public void enableShare(SharedContainerMap map) throws WTException
wt,inf.sharing.SharedContainerMap
with the same
key and target container as the one passed as argument.
enableShare
in interface DataSharingService
map
-
WTException
public void enableShare(Persistable object, WTContainerRef container_ref) throws WTException
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
enableShare
in interface DataSharingService
object
- container_ref
-
WTException
public QueryResult getClassObjects(Class obj_class, WTContainerRef container_ref) throws WTException
getClassObjects
in interface DataSharingService
obj_class
- container_ref
-
WTException
public QueryResult getContainerMaps(WTContainerRef from_container_ref, WTContainerRef to_container_ref, int enabled_status) throws WTException
getContainerMaps
in interface DataSharingService
from_container_ref
- to_container_ref
- enabled_status
-
WTException
public QueryResult getKeyMaps(long share_key, WTContainerRef container_ref, int enabled_status) throws WTException
getKeyMaps
in interface DataSharingService
share_key
- container_ref
- enabled_status
-
WTException
public QueryResult getMaps(WTContainerRef container_ref, boolean not_checked_out) throws WTException
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.
getMaps
in interface DataSharingService
container_ref
- not_checked_out
-
WTException
public SharedContainerMap getObjectKeyMap(long share_key, Persistable object, int enabled_status) throws WTException
getObjectKeyMap
in interface DataSharingService
share_key
- object
- enabled_status
-
WTException
public QueryResult getObjectMaps(Object object, WTContainerRef container_ref, int enabled_status) throws WTException
DataSharingHelper
.
They are the following:
getObjectMaps
in interface DataSharingService
object
- container_ref
- enabled_status
-
WTException
public SortedEnumeration getSharedFolderContents(Folder folder) throws WTException
SortedEnumeration
.
getSharedFolderContents
in interface DataSharingService
folder
-
WTException
public long getShareKey(Persistable object, WTContainerRef to_container_ref) throws WTException
getShareKey
in interface DataSharingService
object
- to_container_ref
-
WTException
public boolean isShareable(Persistable object) throws WTException
Persistable
can be shared. Returns
true
if:
Set
of shared classes
sharing enabled
isShareable
in interface DataSharingService
object
-
WTException
public boolean isSharedTo(Persistable object, WTContainerRef container_ref) throws WTException
If the container reference passed as argument is 'null' then the
method returns whether the object is shared to any container.
Supported API: false
isSharedTo
in interface DataSharingService
object
- container_ref
-
WTException
public void removeShare(SharedContainerMap map) throws WTException
wt,inf.sharing.SharedContainerMap
with the same
key and target container as the one passed as argument.
removeShare
in interface DataSharingService
map
-
WTException
public void removeShare(Persistable object, WTContainerRef container_ref) throws WTException
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
removeShare
in interface DataSharingService
object
- container_ref
-
WTException
public void removeShares(List shares) throws WTException
wt,inf.sharing.SharedContainerMap
contained in
the list passed as argument.
removeShares
in interface DataSharingService
shares
-
WTException
public SharedContainerMap shareFolder(Folder folder, WTContainerRef to_container_ref, Folder to_folder) throws WTException
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:
shareFolder
in interface DataSharingService
folder
- to_container_ref
- to_folder
-
WTException
public SharedContainerMap shareObject(Persistable object, WTContainerRef to_container_ref, Folder to_folder) throws WTException
wt.inf.SharedContainerMap
object representing
the sharing of the data.
The way the operation deals with duplicate shares is as follows:
shareObject
in interface DataSharingService
object
- to_container_ref
- to_folder
-
WTException
Iterated
,
WTContainer
,
Folder
,
wt.sharing.SharedContainerMap
public QueryResult shareObjectList(List objects, WTContainerRef to_container_ref, Folder to_folder) throws WTException
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.
shareObjectList
in interface DataSharingService
objects
- to_container_ref
- to_folder
-
WTException
Iterated
,
WTContainer
,
Folder
,
wt.sharing.SharedContainerMap
,
wt.sharing.DataSharingService#shareObject
public SharedContainerMap shareStructure(Persistable struct_handle, WTContainerRef to_container_ref, Folder to_folder) throws WTException
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.
shareStructure
in interface DataSharingService
struct_handle
- to_container_ref
- to_folder
-
WTException
public SharedContainerMap shareVersion(Persistable object, WTContainerRef to_container_ref, Folder to_folder) throws WTException
wt.inf.SharedContainerMap
object
representing the sharing of the data.
The way the operation deals with duplicate shares is as follows:
shareVersion
in interface DataSharingService
object
- to_container_ref
- to_folder
-
WTException
Iterated
,
WTContainer
,
Folder
,
wt.sharing.SharedContainerMap
public QueryResult shareVersionList(List objects, WTContainerRef to_container_ref, Folder to_folder) throws WTException
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.
shareVersionList
in interface DataSharingService
objects
- to_container_ref
- to_folder
-
WTException
public WTCollection shareVersions(WTCollection objects, WTContainerRef to_container_ref, Folder to_folder) throws WTException
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.
shareVersions
in interface DataSharingService
objects
- to_container_ref
- to_folder
-
WTException
public void switchShare(Persistable object1, WTContainerRef container_ref, Persistable object2) throws WTException
switchShare
in interface DataSharingService
object1
- container_ref
- object2
-
WTException
public WTCollection getObjectShareMaps(WTCollection objects, WTContainerRef container_ref, int enabled_status) throws WTException
DataSharingHelper
.
They are the following:
getObjectShareMaps
in interface DataSharingService
objects
- container_ref
- enabled_status
-
WTException
public WTCollection getVersionShareMaps(WTCollection objects, WTContainerRef container_ref, int enabled_status) throws WTException
DataSharingHelper
.
They are the following:
getVersionShareMaps
in interface DataSharingService
objects
- container_ref
- enabled_status
-
WTException
public WTCollection getAllShareMaps(WTCollection objects, WTContainerRef container_ref, int enabled_status) throws WTException
DataSharingHelper
. They are
the following:
getAllShareMaps
in interface DataSharingService
objects
- container_ref
- enabled_status
-
WTException
public void removeShares(WTCollection shares) throws WTException
wt,inf.sharing.SharedContainerMap
contained in
the collection passed as argument.
removeShares
in interface DataSharingService
shares
-
WTException
public WTCollection getSharedObjects(WTCollection objects, WTContainerRef container_ref) throws WTException
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.
getSharedObjects
in interface DataSharingService
objects
- container_ref
-
WTException
public WTCollection getSharedFolderContents(Folder folder, ConfigSpec config_spec, Class[] obj_classes) throws WTException
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.
getSharedFolderContents
in interface DataSharingService
folder
- config_spec
- obj_classes
-
WTException
public void undoShares(WTCollection objects, WTContainerRef container_ref) throws WTException
undoShares
in interface DataSharingService
objects
- container_ref
-
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |