|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ownership.OwnershipHelper
The OwnershipHelper provides access to the API of the Windchill Ownership
capability. It provides direct static methods which allow access to
information present in Ownable objects. It also provides access to the
remote methods of the OwnershipService by the containment of a static
service object.
Supported API: false
Extendable: false
OwnershipService
,
Ownable
,
Serialized FormField Summary | |
private static String |
CLASSNAME
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
static OwnershipService |
service
Supported API: false |
private static boolean |
VERBOSE
|
Constructor Summary | |
OwnershipHelper()
|
Method Summary | |
static void |
copyOwnership(Ownable source,
Ownable target)
Copy the ownership information from one Ownable object to another. |
static WTPrincipal |
getOwner(Ownable obj)
Retrieve the Owner of the supplied object. |
static WTPrincipalReference |
getOwnerReference(Ownable obj)
Retrieve the Owner Reference of the supplied object. |
static WTPrincipal |
getReadOnlyOwner(Ownable obj)
|
static SearchCondition |
getSearchCondition(Class targetClass,
boolean owned)
Create a SearchCondition that will return Ownable
objects that are either owned or not owned by a WTPrincipal . |
static SearchCondition |
getSearchCondition(Class targetClass,
WTPrincipal owner,
boolean owned)
Create a SearchCondition that will return Ownable
objects that are owned (or not owned) by the supplied WTPrincipal . |
static boolean |
isOwned(Ownable obj)
Determines if the supplied object is owned by any WTPrincipal. |
static boolean |
isOwnedBy(Ownable obj,
WTPrincipal principal)
Determines if the supplied object is owned by a specific WTPrincipal. |
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(OwnershipHelper thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
static boolean |
sameOwnership(Ownable ownable1,
Ownable ownable2)
Determine if two objects have the same owner. |
static void |
setOwner(Ownable obj,
WTPrincipal principal)
Sets the Owner of the supplied object. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final OwnershipService service
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static final boolean VERBOSE
Constructor Detail |
public OwnershipHelper()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(OwnershipHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public static boolean isOwned(Ownable obj) throws WTException
obj
- The object to determine ownership of
WTException
public static boolean isOwnedBy(Ownable obj, WTPrincipal principal) throws WTException
obj
- The object to determine ownership ofprincipal
- The user or group to test for ownership
WTException
public static WTPrincipal getOwner(Ownable obj) throws WTException
obj
- The object to determine ownership of.
WTException
public static SearchCondition getSearchCondition(Class targetClass, boolean owned) throws QueryException
SearchCondition
that will return Ownable
objects that are either owned or not owned by a WTPrincipal
.
You must supply the target class for the search condition.
targetClass
- owned
-
QueryException
QuerySpec
public static SearchCondition getSearchCondition(Class targetClass, WTPrincipal owner, boolean owned) throws QueryException
SearchCondition
that will return Ownable
objects that are owned (or not owned) by the supplied WTPrincipal
.
You must supply the target class for the SearchCondition
.
targetClass
- owner
- owned
-
QueryException
QuerySpec
public static void copyOwnership(Ownable source, Ownable target) throws WTException
source
- target
-
WTException
public static boolean sameOwnership(Ownable ownable1, Ownable ownable2)
ownable1
- ownable2
-
public static void setOwner(Ownable obj, WTPrincipal principal) throws WTException, OwnershipException
obj
- principal
-
WTException
OwnershipException
OwnershipService
public static WTPrincipalReference getOwnerReference(Ownable obj) throws WTException
obj
-
WTException
public static WTPrincipal getReadOnlyOwner(Ownable obj) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |