|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.inf.sharing.StandardDataSharingService
Use the newStandardDataSharingService
static factory method(s),
not the StandardDataSharingService
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: false
Extendable: false
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardDataSharingService()
|
Method Summary | |
private void |
addEnabledClause(QuerySpec qs,
int enabled_status,
int index)
Adds a clause to the query spec that restricts the maps returned to those with the same status as the one passed as argument. |
private void |
addObjectClause(QuerySpec qs,
Object object)
Adds a clause to the query spec that restricts the maps returned to those that reference the object passed as argument. |
private void |
addShareKeyClause(QuerySpec qs,
long share_key)
Adds a clause to the query spec that restricts the maps returned to those with the same status as the one passed as argument. |
private void |
addSourceContainerClause(QuerySpec qs,
WTContainerRef container_ref)
Adds a clause to the query spec that restricts the maps returned to those for which the source container is the one passed as argument as an container reference. |
private void |
addTargetContainerClause(QuerySpec qs,
WTContainerRef container_ref,
int index)
Adds a clause to the query spec that restricts the maps returned to those for which the target container is the one passed as argument as an container reference. |
private void |
appendAnd(QuerySpec qs)
Returns object's identification (name) for debugging purposes |
private void |
appendJoin(QuerySpec qs,
Class link_class,
Class role_a_class,
Class role_b_class,
int lnk_indx,
int a_indx,
int b_indx)
|
private String |
asString(char c)
|
SharedContainerMap |
checkDuplicate(Persistable object,
WTContainerRef to_container_ref,
Folder to_folder,
boolean is_version)
Checks if the object has been shared to the container to the folder passed as argument for the same type of sharing. |
void |
checkIncompatibleDuplicate(Persistable object,
WTContainerRef to_container_ref,
Folder to_folder)
Checks whether the new share is compatible with existing shares of the same object to the same target container. |
private void |
checkValidOp(SharedContainerMap map,
String operation_key)
Checks if the map is safe for a disable/enable/remove operation. |
private void |
checkValidShare(Persistable object,
WTContainerRef to_container_ref,
Folder to_folder)
Throws exception if the sharing of an object to a container/folder is not valid. |
private boolean |
containsVersion(WTCollection unresolvedIteratedProjectShareRefs,
long branchId)
|
private static SharedContainerMap |
copy(SharedContainerMap map,
Persistable object)
|
private WTArrayList |
copyFolderShares(List share_list,
Persistable object,
ObjectReference folder_ref)
Copies shares to the object passed as argument. |
private WTArrayList |
copyFolderShares(WTCollection folder_shares,
HashMap object_map,
HashMap folder_map,
WTHashSet changed_objects)
Copies shares to the objects in the object map passed as argument. |
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. |
private Persistable |
disableMap(SharedContainerMap map)
Disables a given map. |
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. |
void |
emitSharingEvent(String event_type,
WTCollection map_list)
Emits data sharing event. |
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. |
private Persistable |
enableMap(SharedContainerMap map)
Enables a given map. |
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. |
private WTCollection |
getAllProjectShares(WTCollection shares)
Returns a List of all shares to Project. |
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). |
private HashMap |
getCheckedOut(WTContainerRef container_ref)
|
private long[] |
getChunkedIds(long[] id_array,
int n_chunks,
int i)
|
QueryResult |
getClassObjects(Class obj_class,
WTContainerRef container_ref)
Gets all objects of the given class to the container passed as argument. |
String |
getConceptualClassname()
Deprecated. |
private WTCollection |
getConflictResolution(WTCollection allProjectShares,
SharingConflictType conflictType)
Returns a List of all shares to Project. |
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. |
protected ProcessingQueue |
getDataSharingQueue()
Supported API: false |
private QuerySpec |
getFolderContentQS(Folder folder,
ConfigSpec config_spec,
Class obj_class)
|
private static List |
getFolderContents(Folder folder,
HashMap content_map)
Returns the contents of the folder and subfolders. |
private QueryResult |
getFolderMapChunk(long[] folder_id__array)
|
private WTArrayList |
getFolderMaps(Persistable object,
ObjectReference folder_ref)
Returns a list with all maps associated for the object and folder passed as argument. |
private HashMap |
getFolderShareMap(WTCollection folder_shares)
|
private static long |
getId(Object object)
Returns object's id. |
private long[] |
getKeyArray(WTCollection maps)
|
private QueryResult |
getKeyMapChunk(long[] key_array)
|
QueryResult |
getKeyMaps(long share_key,
WTContainerRef container_ref,
int enabled_status)
Returns all sharing maps that have the key passed as argument. |
private WTCollection |
getKeyMaps(WTCollection maps)
Returns all maps with the same key as one of the maps passed as argument. |
private List |
getList(Object object)
Returns a list with the object passed as argument. |
private QueryResult |
getMapChunk(long[] ver_id_array,
long[] obj_id_array,
WTContainerRef container_ref,
int enabled_status)
|
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. |
private static Persistable |
getObject(ObjectIdentifier obj_id)
Retrieves object given its object identifier. |
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). |
private String |
getObjectName(Object object)
Returns object's identification (name) for debugging purposes |
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). |
private SearchCondition |
getObjSc(ObjectIdentifier oid)
Returns the search condition for a given object or object's iteration. |
static ObjectIdentifier |
getOid(Object object)
Returns object's associated oid. |
static String |
getOidString(Object object)
Returns String representation of the object's oid (debugging). |
private WTCollection |
getOriginalObjects(WTCollection unresolvedProjectShareRefs,
WTCollection originalObjects)
Returns a List of all shares to Project. |
private WTCollection |
getRefs(WTCollection unresolvedProjectShares)
Returns a List of all shares to Project.x |
private int |
getShareableState(Persistable object)
|
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. |
private WTArrayList |
getTargetFolderMaps(WTKeyedMap folder_map)
Returns all shares such that the target folder has the oid passed as argument. |
private WTValuedMap |
getTargetFolderPairs(Persistable target,
ObjectReference folder_ref)
|
private SearchCondition |
getVerSc(long branch_id)
Returns the search condition for a given object's version. |
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. |
private boolean |
isValidOp(SharedContainerMap map,
String operation_key)
Returns true if operation is valid, 'false' otherwise. |
private void |
markSharesForDelete(WTContainer container)
Marks for delete all shares that reference container passed as argument. |
private void |
moveAclEntries(AdHocControlled object1,
Persistable object2,
long owner_id)
Removes all ACL entries from object1 with the key passed as argument. |
static StandardDataSharingService |
newStandardDataSharingService()
Default factory for the class. |
private boolean |
noShares()
|
protected void |
performStartupProcess()
Supported API: false |
private SharedContainerMap |
populateAttributes(SharedContainerMap map,
Persistable object,
WTContainerRef to_container_ref,
Folder to_folder,
long share_key,
int share_type)
Populates the attributes of a SharedContainedMap passed as argument. |
private void |
processCheckInEvent(WTKeyedMap object_map)
Processes multi-object check in event. |
static void |
processCheckInStructEvent(String obj_class_name,
ObjectIdentifier obj_id)
Calls structure delegate to process a check in event. |
private void |
processContainerMoveEvent(WTCollection objects)
Update the source container reference on any SharedContainerMaps that refer to the moved object |
static void |
processCreateLinkEvent(String link_class_name,
ObjectIdentifier link_id)
Calls structure delegate to process a store event in which a link is created. |
private void |
processCreateObjectEvent(WTCollection objects)
Processes object creation. |
static void |
processDeleteLinkEvent(String link_class_name,
QueryKey roleA_id,
QueryKey roleB_id)
Calls structure delegate to process a store event in which a binary link is deleted. |
private void |
processDeleteObjectEvent(WTCollection objects)
Processes object deletion. |
private void |
processExcludes(QuerySpec qs,
int from_index)
|
private void |
processFolderChangeEvent(FolderServiceEvent folder_event)
Processes folder change events. |
private void |
processFolderChangeMaps(WTValuedMap target_folder_map,
List dest_list,
WTArrayList added_maps,
WTArrayList removed_maps)
Called from processFolderChangeEvent(). |
private void |
queueMethodCall(String method_name,
Class[] arg_types,
Object[] args)
Queues a call to the method whose's name is passed as argument. |
private void |
registerAsListener()
Register as listener to the following events: POST_MARK_FOR_DELETE POST_RESTORE_MARK_FOR_DELETE POST_CHANGE_FOLDER POST_STORE POST_DELETE POST_CHECKIN |
void |
registerEvents(ManagerService service)
Supported API: false |
private void |
removeContainerEntries(AdHocControlled object,
long container_id,
IterationIdentifier iter_id,
WTCollection objects)
Removes all entries in the object due to the sharing from the container passed as argument. |
private void |
removeMap(SharedContainerMap map)
Removes a given map. |
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. |
private void |
restoreShares(WTContainer container)
Restores all shares marked for delete that reference container passed as argument. |
private boolean |
sameIterId(Iterated object,
IterationIdentifier iter_id)
Determines whether the iteration identifier of an Iterated object is the same as one passed as argument. |
SharedContainerMap |
setAccessControl(SharedContainerMap map,
WTContainer container,
Persistable object)
Sets ad hoc access control to the map and object passed as argument. |
SharedContainerMap |
setAccessControl(SharedContainerMap map,
WTContainer container,
Persistable object,
Folder to_folder)
|
private WTCollection |
shareableCollection(WTCollection objects)
Returns a List from a QueryResult. |
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. |
private WTArrayList |
shareObjectSet(List objects,
WTContainerRef to_container_ref,
Folder to_folder,
long share_key,
int share_type,
int mode)
Shares a set of objects given in a list. |
private SharedContainerMap |
sharePersistable(Persistable object,
WTContainerRef to_container_ref,
Folder to_folder,
long share_key,
int share_type)
Shares an individual object. |
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. |
private SharedContainerMap |
shareVersion(Persistable object,
WTContainerRef to_container_ref,
Folder to_folder,
long share_key,
int share_type)
Shares an individual object. |
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. |
private HashMap |
shareVersionSet(List objects,
WTContainerRef to_container_ref,
Folder to_folder,
long share_key,
int share_type)
Shares a set of objects. |
private String |
showAdHocAcl(AdHocControlled object)
Shows ad hoc ACL. |
private static String |
showCollection(Collection collection)
Returns String representation of the list passed as argument (debugging). |
private static String |
showIds(long[] ids)
|
private String |
showMap(SharedContainerMap map)
Returns String representtaion of a SharedContainerMap for debugging purposes |
private String |
showShareType(int share_type)
Returns a readable representation of the share type. |
private void |
sortFolders(List folders)
|
void |
switchShare(Persistable object1,
WTContainerRef container_ref,
Persistable object2)
Replaces an object for another in a share map for a given target container. |
private static List |
toList(QueryResult qr)
Returns a List from a QueryResult. |
private static QueryResult |
toQueryResult(WTArrayList wt_list)
Returns a QueryResult of Persistables from a WTCollection. |
private long[] |
toVersionIdArray(WTCollection objects)
Returns an array of version ids from the objects passed as argument. |
private static WTArrayList |
toWTArrayList(Persistable object)
Returns a WTCollection with a single persistable. |
private static WTArrayList |
toWTArrayList(QueryResult qr)
Returns a WTCollection from a QueryResult consisting only of persistables. |
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, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private final DataSharingDelegateFactory delegateFactory
DataSharingDelegateFactory
.
private static final StructureSharingDelegateFactory structDelegateFactory
StructureSharingDelegateFactory
.
private static final String SHARING_QUEUE_NAME
private ProcessingQueue sharingQueue
private static final boolean VERBOSE
private static final String SUB_FOLDER_CLASS_NAME
private static final String CABINET_CLASS_NAME
private static final String SHARE_TABLE_NAME
private static final int SHARING_QUEUE_INTERVAL
private static final boolean USE_QUEUE
private static final int OBJECT_MODE
private static final int VERSION_MODE
private static final int CHUNK_SIZE
private Map excludesCache
private static final int OBJECT_SHAREABLE
private static final int OBJECT_NOT_SHAREABLE
private static final int SHARING_NOT_ENABLED
private static final int IN_PERSONAL_CABINET
private static final String SHARED_OBJECT_KEY
private static final String SHARED_OBJECT_ID
private static final String SHARED_VERSION_ID
private static final String TARGET_FOLDER_KEY
private static final String TARGET_FOLDER_ID
private static final String TARGET_CONTAINER_KEY
private static final String SOURCE_CONTAINER_KEY
private static final String OBJECT_BRANCH_ID
private static final String MOVE_EVENT_CLASS_NAME
private static final String MOVE_EVENT_NAME
protected static final Object FOLDER_SHARE_ACCESS_KEY
Constructor Detail |
public StandardDataSharingService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
protected ProcessingQueue getDataSharingQueue() throws WTException
WTException
public static void processCheckInStructEvent(String obj_class_name, ObjectIdentifier obj_id) throws WTException
obj_class_name
- obj_id
-
WTException
public static void processDeleteLinkEvent(String link_class_name, QueryKey roleA_id, QueryKey roleB_id) throws WTException
Note:
Supported API: false
link_class_name
- roleA_id
- roleB_id
-
WTException
public static void processCreateLinkEvent(String link_class_name, ObjectIdentifier link_id) throws WTException
link_class_name
- link_id
-
WTException
public static StandardDataSharingService newStandardDataSharingService() 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
public void emitSharingEvent(String event_type, WTCollection map_list) throws WTException
emitSharingEvent
in interface DataSharingServiceSvr
event_type
- map_list
-
WTException
public void registerEvents(ManagerService service)
registerEvents
in interface DataSharingServiceSvr
registerEvents
in class StandardManager
service
- public SharedContainerMap setAccessControl(SharedContainerMap map, WTContainer container, Persistable object) throws WTException
setAccessControl
in interface DataSharingServiceSvr
map
- container
- object
-
WTException
private QueryResult getFolderMapChunk(long[] folder_id__array) throws WTException
WTException
private QueryResult getKeyMapChunk(long[] key_array) throws WTException
WTException
private QueryResult getMapChunk(long[] ver_id_array, long[] obj_id_array, WTContainerRef container_ref, int enabled_status) throws WTException
WTException
private long[] getChunkedIds(long[] id_array, int n_chunks, int i)
private WTCollection getKeyMaps(WTCollection maps) throws WTException
WTException
private long[] getKeyArray(WTCollection maps) throws WTException
WTException
private void processFolderChangeMaps(WTValuedMap target_folder_map, List dest_list, WTArrayList added_maps, WTArrayList removed_maps) throws WTException
WTException
private WTArrayList getFolderMaps(Persistable object, ObjectReference folder_ref) throws WTException
WTException
private static SharedContainerMap copy(SharedContainerMap map, Persistable object) throws WTException
WTException
private void moveAclEntries(AdHocControlled object1, Persistable object2, long owner_id) throws WTException
WTException
private void queueMethodCall(String method_name, Class[] arg_types, Object[] args) throws WTException
WTException
private static Persistable getObject(ObjectIdentifier obj_id) throws WTException
WTException
private void addEnabledClause(QuerySpec qs, int enabled_status, int index) throws WTException
WTException
private void addShareKeyClause(QuerySpec qs, long share_key) throws WTException
WTException
private void addTargetContainerClause(QuerySpec qs, WTContainerRef container_ref, int index) throws WTException
WTException
private void addSourceContainerClause(QuerySpec qs, WTContainerRef container_ref) throws WTException
WTException
private void addObjectClause(QuerySpec qs, Object object) throws WTException
WTException
private HashMap getCheckedOut(WTContainerRef container_ref) throws WTException
WTException
private SearchCondition getObjSc(ObjectIdentifier oid) throws WTException
WTException
private SearchCondition getVerSc(long branch_id) throws WTException
WTException
private long[] toVersionIdArray(WTCollection objects) throws WTException
WTException
private String showShareType(int share_type)
private SharedContainerMap sharePersistable(Persistable object, WTContainerRef to_container_ref, Folder to_folder, long share_key, int share_type) throws WTException
WTException
private SharedContainerMap shareVersion(Persistable object, WTContainerRef to_container_ref, Folder to_folder, long share_key, int share_type) throws WTException
WTException
private void registerAsListener() throws ManagerException
ManagerException
private void processContainerMoveEvent(WTCollection objects) throws WTException
objects
- The objects that were moved
WTException
private void processCheckInEvent(WTKeyedMap object_map) throws WTException
WTException
private void processCreateObjectEvent(WTCollection objects) throws WTException
WTException
private void processDeleteObjectEvent(WTCollection objects) throws WTException
WTException
private void processFolderChangeEvent(FolderServiceEvent folder_event) throws WTException
WTException
private HashMap getFolderShareMap(WTCollection folder_shares) throws WTException
WTException
private WTValuedMap getTargetFolderPairs(Persistable target, ObjectReference folder_ref) throws WTException
WTException
private WTArrayList getTargetFolderMaps(WTKeyedMap folder_map) throws WTException
WTException
private void markSharesForDelete(WTContainer container) throws WTException
WTException
private void restoreShares(WTContainer container) throws WTException
WTException
private void checkValidShare(Persistable object, WTContainerRef to_container_ref, Folder to_folder) throws WTException
WTException
isShareable(Persistable)
private int getShareableState(Persistable object) throws WTException
WTException
private WTArrayList copyFolderShares(List share_list, Persistable object, ObjectReference folder_ref) throws WTException
WTException
private WTArrayList copyFolderShares(WTCollection folder_shares, HashMap object_map, HashMap folder_map, WTHashSet changed_objects) throws WTException
WTException
private static List getFolderContents(Folder folder, HashMap content_map) throws WTException
WTException
private WTArrayList shareObjectSet(List objects, WTContainerRef to_container_ref, Folder to_folder, long share_key, int share_type, int mode) throws WTException
private HashMap shareVersionSet(List objects, WTContainerRef to_container_ref, Folder to_folder, long share_key, int share_type) throws WTException
WTException
public void checkIncompatibleDuplicate(Persistable object, WTContainerRef to_container_ref, Folder to_folder) throws WTException
WTException
public SharedContainerMap checkDuplicate(Persistable object, WTContainerRef to_container_ref, Folder to_folder, boolean is_version) throws WTException
Assumes that the type of the intended share is SharedContainerMap.SINGLE.
WTException
private void checkValidOp(SharedContainerMap map, String operation_key) throws WTException
Throws an exception if the operation is not valid.
WTException
private boolean isValidOp(SharedContainerMap map, String operation_key) throws WTException
WTException
private SharedContainerMap populateAttributes(SharedContainerMap map, Persistable object, WTContainerRef to_container_ref, Folder to_folder, long share_key, int share_type) throws WTException
WTException
private Persistable disableMap(SharedContainerMap map) throws WTException
WTException
private void removeMap(SharedContainerMap map) throws WTException
WTException
private void removeContainerEntries(AdHocControlled object, long container_id, IterationIdentifier iter_id, WTCollection objects) throws WTException
Doesn't actually update the objects but rather returns a collection of all modified objects in a WTCollection. It is the responsibility of the calling method to update the objects.
WTException
private boolean sameIterId(Iterated object, IterationIdentifier iter_id) throws WTException
WTException
private Persistable enableMap(SharedContainerMap map) throws WTException
WTException
public static ObjectIdentifier getOid(Object object)
private static long getId(Object object)
private List getList(Object object)
public static String getOidString(Object object)
private static String showIds(long[] ids)
private static String showCollection(Collection collection) throws WTException
WTException
private String showMap(SharedContainerMap map) throws WTException
WTException
private void appendAnd(QuerySpec qs)
private String getObjectName(Object object)
private void appendJoin(QuerySpec qs, Class link_class, Class role_a_class, Class role_b_class, int lnk_indx, int a_indx, int b_indx) throws WTException
WTException
private void processExcludes(QuerySpec qs, int from_index) throws WTException
WTException
private QuerySpec getFolderContentQS(Folder folder, ConfigSpec config_spec, Class obj_class) throws WTException
WTException
private boolean noShares() throws WTException
WTException
private void sortFolders(List folders) throws WTException
WTException
private static WTArrayList toWTArrayList(QueryResult qr)
private static QueryResult toQueryResult(WTArrayList wt_list) throws WTException
WTException
private static WTArrayList toWTArrayList(Persistable object)
private static List toList(QueryResult qr)
private WTCollection shareableCollection(WTCollection objects) throws WTException
WTException
private String asString(char c)
private String showAdHocAcl(AdHocControlled object) throws WTException
WTException
private WTCollection getAllProjectShares(WTCollection shares) throws WTException
WTException
private WTCollection getConflictResolution(WTCollection allProjectShares, SharingConflictType conflictType) throws WTException
WTException
private WTCollection getOriginalObjects(WTCollection unresolvedProjectShareRefs, WTCollection originalObjects) throws WTException
WTException
private boolean containsVersion(WTCollection unresolvedIteratedProjectShareRefs, long branchId) throws WTException
WTException
private WTCollection getRefs(WTCollection unresolvedProjectShares) throws WTException
WTException
public SharedContainerMap setAccessControl(SharedContainerMap map, WTContainer container, Persistable object, Folder to_folder) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |