wt.inf.sharing
Class CtmDataSharingDelegate

java.lang.Object
  extended bywt.inf.sharing.AbstractDataSharingDelegate
      extended bywt.inf.sharing.CtmDataSharingDelegate
All Implemented Interfaces:
DataSharingDelegate, Externalizable, Serializable

public class CtmDataSharingDelegate
extends AbstractDataSharingDelegate
implements Externalizable

Data sharing delegate for ContainerTeamManaged containers.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private static String LIBRARY
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String PRODUCT
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean VERBOSE
           
 
Constructor Summary
CtmDataSharingDelegate()
           
 
Method Summary
 void checkValidContainerState(WTContainer container)
           
 void checkValidShare(Persistable object, WTContainer to_container, boolean is_version_share)
          

Supported API: false
 void checkValidShare(WTCollection objects, WTContainer to_container, boolean is_version_share)
          

Supported API: false
 ObjectIdentifier getOid(Object object)
          Returns object's associated oid.
 String getOidString(Object object)
          Returns String representation of the object's oid (debugging).
 boolean noAdHocAccess(Persistable object)
          Determines whether object should be added default ad hoc ACL entries.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(CtmDataSharingDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  void setIterationAdHocAccess(AdHocControlled object, WTPrincipal user, WTPrincipalReference admins_ref, WTContainer to_container, long target_container_id)
           
private  void setIterationAdHocAccess(Persistable object, WTContainer to_container, Folder to_folder)
           
 SharedContainerMap setMapAccess(SharedContainerMap map)
          Gives the share creator and container administrators all rights over the share.
 WTCollection setMapAccess(WTCollection maps)
          Sets ad hoc access control to the SharedContainerMap objects contained in the WTCollection passed as argument.
 Persistable setObjectAccess(Persistable object, WTContainer to_container, boolean is_version_share)
          Gives the container administrators the same rights as the share creator over the share target.
 Persistable setObjectAccess(Persistable object, WTContainer to_container, boolean is_version_share, Folder to_folder)
           
 WTCollection setObjectAccess(WTCollection objects, WTContainer to_container, boolean is_version_share)
          Sets ad hoc access control to the Persistable objects contained in the WTCollection passed as argument This method is called when the object is being shared to the container passed as argument.
 WTCollection setObjectAccess(WTCollection objects, WTContainer to_container, boolean is_version_share, Folder to_folder)
           
private  void setObjectAdHocAccess(AdHocControlled object, WTPrincipal user, WTPrincipalReference admins_ref, WTContainer to_container, long target_container_id)
           
private  Persistable setObjectAdHocAccess(Persistable object, WTContainer to_container, Folder to_folder)
           
private  String showCollection(Collection collection)
          Returns String representation of the list passed as argument (debugging).
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.inf.sharing.AbstractDataSharingDelegate
readVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE

PRODUCT

private static final String PRODUCT

LIBRARY

private static final String LIBRARY
Constructor Detail

CtmDataSharingDelegate

public CtmDataSharingDelegate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractDataSharingDelegate
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractDataSharingDelegate
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(CtmDataSharingDelegate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

setMapAccess

public SharedContainerMap setMapAccess(SharedContainerMap map)
                                throws WTException
Gives the share creator and container administrators all rights over the share.

Supported API: false

Specified by:
setMapAccess in interface DataSharingDelegate
Overrides:
setMapAccess in class AbstractDataSharingDelegate
Parameters:
map -
Returns:
SharedContainerMap
Throws:
WTException

setObjectAccess

public Persistable setObjectAccess(Persistable object,
                                   WTContainer to_container,
                                   boolean is_version_share)
                            throws WTException
Gives the container administrators the same rights as the share creator over the share target. Gives READ access to all members of the container over the share target.

Supported API: false

Specified by:
setObjectAccess in interface DataSharingDelegate
Overrides:
setObjectAccess in class AbstractDataSharingDelegate
Parameters:
object -
to_container -
is_version_share -
Returns:
Persistable
Throws:
WTException

setMapAccess

public WTCollection setMapAccess(WTCollection maps)
                          throws WTException
Sets ad hoc access control to the SharedContainerMap objects contained in the WTCollection passed as argument. Returns a collection of persisted shares. This method is called when shares are created. and the maps passed as argument has not been persisted yet.

Supported API: false

Specified by:
setMapAccess in interface DataSharingDelegate
Overrides:
setMapAccess in class AbstractDataSharingDelegate
Parameters:
maps -
Returns:
WTCollection
Throws:
WTException

setObjectAccess

public WTCollection setObjectAccess(WTCollection objects,
                                    WTContainer to_container,
                                    boolean is_version_share)
                             throws WTException
Sets ad hoc access control to the Persistable objects contained in the WTCollection passed as argument This method is called when the object is being shared to the container passed as argument. The object is updated in the database in case it is modified. Returns a collection of persisted objects.

Supported API: false

Specified by:
setObjectAccess in interface DataSharingDelegate
Overrides:
setObjectAccess in class AbstractDataSharingDelegate
Parameters:
objects -
to_container -
is_version_share -
Returns:
WTCollection
Throws:
WTException

checkValidShare

public void checkValidShare(Persistable object,
                            WTContainer to_container,
                            boolean is_version_share)
                     throws WTException


Supported API: false

Specified by:
checkValidShare in interface DataSharingDelegate
Overrides:
checkValidShare in class AbstractDataSharingDelegate
Parameters:
object -
to_container -
is_version_share -
Throws:
WTException

checkValidShare

public void checkValidShare(WTCollection objects,
                            WTContainer to_container,
                            boolean is_version_share)
                     throws WTException


Supported API: false

Specified by:
checkValidShare in interface DataSharingDelegate
Overrides:
checkValidShare in class AbstractDataSharingDelegate
Parameters:
objects -
to_container -
is_version_share -
Throws:
WTException

checkValidContainerState

public void checkValidContainerState(WTContainer container)
                              throws WTException
Throws:
WTException

getOid

public ObjectIdentifier getOid(Object object)
Returns object's associated oid. Accepts not only Persistable as argument but also ObjectReference and ObjectIdentifier objects. Returns 'null' if object is null.


noAdHocAccess

public boolean noAdHocAccess(Persistable object)
                      throws WTException
Determines whether object should be added default ad hoc ACL entries. When these objects are shared from a PDM container (product or library) there should be no implicit ad hoc ACLs applied to them. Users should not be able to extend access control to them. Whatever access control the user had for the source object is the access control when it is shared to the project.

Throws:
WTException

setObjectAdHocAccess

private void setObjectAdHocAccess(AdHocControlled object,
                                  WTPrincipal user,
                                  WTPrincipalReference admins_ref,
                                  WTContainer to_container,
                                  long target_container_id)
                           throws WTException
Throws:
WTException

setIterationAdHocAccess

private void setIterationAdHocAccess(AdHocControlled object,
                                     WTPrincipal user,
                                     WTPrincipalReference admins_ref,
                                     WTContainer to_container,
                                     long target_container_id)
                              throws WTException
Throws:
WTException

getOidString

public String getOidString(Object object)
Returns String representation of the object's oid (debugging).


showCollection

private String showCollection(Collection collection)
                       throws WTException
Returns String representation of the list passed as argument (debugging).

Throws:
WTException

setObjectAccess

public Persistable setObjectAccess(Persistable object,
                                   WTContainer to_container,
                                   boolean is_version_share,
                                   Folder to_folder)
                            throws WTException
Specified by:
setObjectAccess in interface DataSharingDelegate
Throws:
WTException

setObjectAccess

public WTCollection setObjectAccess(WTCollection objects,
                                    WTContainer to_container,
                                    boolean is_version_share,
                                    Folder to_folder)
                             throws WTException
Specified by:
setObjectAccess in interface DataSharingDelegate
Throws:
WTException

setIterationAdHocAccess

private void setIterationAdHocAccess(Persistable object,
                                     WTContainer to_container,
                                     Folder to_folder)
                              throws WTException
Throws:
WTException

setObjectAdHocAccess

private Persistable setObjectAdHocAccess(Persistable object,
                                         WTContainer to_container,
                                         Folder to_folder)
                                  throws WTException
Throws:
WTException