|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.folder.FolderHelper
This class provides access to the Windchill foldering capability. The
FolderHelper contains direct static methods which provide access to information
which is stored within all Foldered and CabinetResident objects. It
also provides access to the remote interface of the FolderService itself.
Supported API: true
Extendable: false
FolderService
,
Foldered
,
FolderEntry
,
CabinetBased
Field Summary | |
private static String |
CABINET_ID
|
private static String |
CLASSNAME
|
private static boolean |
DEBUG
|
private static DebugWriter |
LOG
|
private static String |
RESOURCE
|
static FolderService |
service
Supported API: false |
static int |
SIZE_LIMIT
|
Constructor Summary | |
FolderHelper()
|
Method Summary | |
static CabinetBased |
assignCabinetReference(CabinetBased theEntry,
CabinetReference cabinetRef)
Prepare the object to be stored into the database. |
static Foldered |
assignFolder(Foldered theEntry,
Folder folder)
Deprecated. |
static Foldered |
assignFolderByReference(Foldered theEntry,
ObjectReference folderRef)
Prepare the object to be stored into the database. |
static void |
assignLocation(CabinetMember new_member,
Cabinet location)
Deprecated. Replaced by assignLocations(WTValuedMap) |
static void |
assignLocation(CabinetMember new_member,
String location)
Deprecated. Replaced by assignLocations(WTValuedMap) |
static void |
assignLocation(Foldered new_member,
Folder location)
Deprecated. Replaced by assignLocations(WTValuedMap) |
static void |
assignLocation(Foldered new_member,
String location)
Deprecated. Replaced by assignLocations(WTValuedMap) |
static void |
assignLocation(FolderEntry new_entry,
Folder location)
Assign the initial location of the foldered object. |
static void |
assignLocation(FolderEntry new_entry,
String location)
Deprecated. Replaced by assignLocations(WTValuedMap) |
static void |
assignLocation(FolderEntry new_entry,
String location,
WTContainerRef container)
Deprecated. Replaced by assignLocations(WTValuedMap) |
static void |
assignLocation(WTCollection entries,
Folder folder)
Assigns a collection of FolderEntry objects to a given Folder. |
static void |
assignLocations(WTValuedMap entry_to_folder_map)
Assigns each FolderEntry key in the input map to the corresponding Folder map value. |
(package private) static boolean |
eq(Object o1,
Object o2)
Return true if the given objects are both null or are equal |
static WTValuedMap |
getCabinetBasedToCabinetMap(WTCollection objects)
Get the cabinets for the given set of CabinetBased objects. |
static WTValuedMap |
getCabinetBasedToFolderMap(WTCollection objects)
Get the parent folders for the given collection of CabinetBased objects. |
static WTKeyedMap |
getCabinetBasedToLocationMap(WTCollection objects)
Get the locations for the given CabinetBased objects. |
static WTKeyedMap |
getCabinetBasedToPathMap(WTCollection objects)
Get the paths for the given CabinetBased objects. |
static CabinetReference |
getCabinetReference(CabinetBased object)
Retrieve the reference to the cabinet the object is part of. |
static CabinetReference |
getCabinetReference(FolderEntry entry)
Deprecated. Replaced by getCabinetReference(CabinetBased) |
static Folder |
getFolder(FolderEntry theEntry)
gets the Folder that the object resides in
Supported API: false |
static String |
getFolderPath(CabinetBased object)
calculates the folder path of the specified entry Supported API: true |
(package private) static String |
getFolderPath(CabinetBased object,
String location)
Get the folder path for the given CabinetBased object and location |
static String |
getFolderPath(FolderEntry entry)
Deprecated. Replaced by getFolderPath(CabinetBased) |
static Object[] |
getFolderPaths(CabinetBased[] objects)
Deprecated. Replaced by getCabinetBasedToPathMap(wt.fc.collections.WTCollection) |
static String |
getLocation(CabinetBased object)
calculates the location of a CabinetBased object where
location is defined as the the folder path of the Folder
that the object is part of
Supported API: true |
static String |
getLocation(FolderEntry entry)
Deprecated. Replaced by getLocation(CabinetBased) |
static Object[] |
getLocations(CabinetBased[] objects)
Deprecated. Replaced by #getCabinetBasedToLocationMap |
static ArrayList |
getLocationsFromMemberships(List memberships)
Deprecated. Replaced by getCabinetBasedToLocationMap(wt.fc.collections.WTCollection) |
static ArrayList |
getMemberships(List members)
Deprecated. Replaced by FolderService.getEntryToMembershipMap(wt.fc.collections.WTCollection) |
static WTSet |
getObjsInPersonalCabinets(WTCollection objsToCheck)
Given an input WTCollection of CabinetBased objects, this routine returns the subset which reside in personal cabinets. |
static SearchCondition |
getSearchCondition(Cabinet cabinet,
boolean residesIn)
Return a SearchCondition object which can be used to
locate all Foldered objects that either reside in or
don't reside in the specified Cabinet . |
static boolean |
inPersonalCabinet(CabinetBased object)
Deprecated. Replaced by getObjsInPersonalCabinets(WTCollection) |
static boolean |
inPersonalCabinet(FolderEntry entry)
Deprecated. Replaced by inPersonalCabinet(CabinetBased) |
static boolean |
isPersonalCabinet(Cabinet cabinet)
Deprecated. Replaced by Cabinet.isPersonalCabinet() |
static boolean |
sameCabinet(CabinetBased object1,
CabinetBased object2)
Returns true if the two objects are stored in the same Cabinet . |
(package private) static boolean |
setFolder(FolderEntry entry,
Folder destination)
Utility method that assigns the given entrie's in-memory folder reference to point ot the given destination |
static void |
validateName(String name)
A method to validate that the name of the Foldered object is valid as part of a folder path. |
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 FolderService service
private static final boolean DEBUG
private static final DebugWriter LOG
public static final int SIZE_LIMIT
private static final String CABINET_ID
Constructor Detail |
public FolderHelper()
Method Detail |
public static void assignLocation(FolderEntry new_entry, Folder location) throws WTException
new_entry
- location
-
WTException
assignLocations(wt.fc.collections.WTValuedMap)
public static void assignLocation(FolderEntry new_entry, String location) throws WTException, FolderNotFoundException
assignLocations(WTValuedMap)
new_entry
- location
-
WTException
FolderNotFoundException
public static void assignLocation(FolderEntry new_entry, String location, WTContainerRef container) throws WTException, FolderNotFoundException
assignLocations(WTValuedMap)
new_entry
- location
- container
-
WTException
FolderNotFoundException
public static CabinetReference getCabinetReference(CabinetBased object) throws WTException
object
-
WTException
getCabinetBasedToCabinetMap(wt.fc.collections.WTCollection)
public static Folder getFolder(FolderEntry theEntry) throws WTException
Folder
that the object resides in
theEntry
-
null
if the object has not been assigned to a
Folder
yet
WTException
- if a low level error occursgetCabinetBasedToFolderMap(wt.fc.collections.WTCollection)
public static String getFolderPath(CabinetBased object) throws WTException
object
-
null
if the object has not been assigned to a
Folder
yet
WTException
- if a low level error occursgetCabinetBasedToPathMap(wt.fc.collections.WTCollection)
public static String getLocation(CabinetBased object) throws WTException
CabinetBased
object where
location is defined as the the folder path of the Folder
that the object is part of
object
-
null
if the object has not been assigned to a
Folder
yet
WTException
- if a low level error occursgetCabinetBasedToLocationMap(wt.fc.collections.WTCollection)
public static SearchCondition getSearchCondition(Cabinet cabinet, boolean residesIn) throws QueryException
SearchCondition
object which can be used to
locate all Foldered
objects that either reside in or
don't reside in the specified Cabinet
.
cabinet
- residesIn
-
QueryException
public static boolean inPersonalCabinet(CabinetBased object) throws WTException
getObjsInPersonalCabinets(WTCollection)
object
-
WTException
public static boolean isPersonalCabinet(Cabinet cabinet) throws WTException
Cabinet.isPersonalCabinet()
Cabinet
is a personal cabinet.
cabinet
-
WTException
public static boolean sameCabinet(CabinetBased object1, CabinetBased object2) throws WTException
Cabinet
.
If the entry is a shortcut, the test is done on the cabinet of shortcut's
parent folder.
object1
- object2
-
WTException
public static void validateName(String name) throws FolderException
FolderService.FOLDER_SEPARATOR
.
name
-
FolderException
public static Foldered assignFolder(Foldered theEntry, Folder folder) throws WTException
theEntry
- folder
-
WTException
public static CabinetReference getCabinetReference(FolderEntry entry) throws WTException
getCabinetReference(CabinetBased)
entry
-
WTException
public static String getFolderPath(FolderEntry entry) throws WTException
getFolderPath(CabinetBased)
entry
-
WTException
public static String getLocation(FolderEntry entry) throws WTException
getLocation(CabinetBased)
entry
-
WTException
public static boolean inPersonalCabinet(FolderEntry entry) throws WTException
inPersonalCabinet(CabinetBased)
entry
-
WTException
public static void assignLocation(Foldered new_member, Folder location) throws WTException
assignLocations(WTValuedMap)
new_member
- location
-
WTException
public static void assignLocation(Foldered new_member, String location) throws WTException, FolderNotFoundException
assignLocations(WTValuedMap)
new_member
- location
-
WTException
FolderNotFoundException
public static void assignLocation(CabinetMember new_member, Cabinet location) throws WTException
assignLocations(WTValuedMap)
new_member
- location
-
WTException
public static void assignLocation(CabinetMember new_member, String location) throws WTException, FolderNotFoundException
assignLocations(WTValuedMap)
new_member
- location
-
WTException
FolderNotFoundException
public static Object[] getLocations(CabinetBased[] objects) throws WTException
objects
-
WTException
public static Object[] getFolderPaths(CabinetBased[] objects) throws WTException
getCabinetBasedToPathMap(wt.fc.collections.WTCollection)
objects
-
WTException
public static ArrayList getMemberships(List members) throws WTException
FolderService.getEntryToMembershipMap(wt.fc.collections.WTCollection)
members
-
WTException
public static ArrayList getLocationsFromMemberships(List memberships) throws WTException
getCabinetBasedToLocationMap(wt.fc.collections.WTCollection)
memberships
-
WTException
public static void assignLocation(WTCollection entries, Folder folder) throws WTException
Supported API: true
entries
- folder
- Folder to assign objects to
WTException
assignLocations(WTValuedMap)
public static void assignLocations(WTValuedMap entry_to_folder_map) throws WTException
entry_to_folder_map
- map from FolderEntry objects to the Folders to which they are to be assigned
WTException
public static WTValuedMap getCabinetBasedToFolderMap(WTCollection objects) throws WTException
If any of the objects are Foldered, then the implementation will first
check to see if their FolderingInfos contain a cached reference to
their parent folder, and use the cached instance as the return value.
So in some cases this API will not require a trip to the server.
Supported API: true
objects
- The CabinetBased objects to find folders for
FolderNotFoundException
WTException
public static WTKeyedMap getCabinetBasedToLocationMap(WTCollection objects) throws WTException
If any of the objects are Foldered, then the implementation will first
check to see if their FolderingInfos contain a cached location, and
use the cached location as the return value. So in some cases this
API will not require a trip to the server.
Supported API: true
objects
- The CabinetBased objects to find locations for
FolderNotFoundException
WTException
public static WTKeyedMap getCabinetBasedToPathMap(WTCollection objects) throws WTException
If any of the objects are Foldered, then the implementation will first
check to see if their FolderingInfos contain a cached reference to
their path, and use the cached path as the return value. So in some
cases this API will not require a trip to the server.
Supported API: true
objects
- The CabinetBased objects to find paths for
FolderNotFoundException
WTException
public static WTValuedMap getCabinetBasedToCabinetMap(WTCollection objects) throws WTException
This implementation will not inflate the resutling CabinetRefernece
objects. To ensure the references are inflated, use FolderService.getCabinetBasedToCabinetMap(wt.fc.collections.WTCollection)
Supported API: true
objects
-
WTException
public static WTSet getObjsInPersonalCabinets(WTCollection objsToCheck) throws WTException
This implementation will minimize client-server traffic by checking for inflated cabinet references on the input collection, and using the cached information if available.
This is a multi-object form of inPersonalCabinet(CabinetBased)
.
Supported API: true
objsToCheck
- objects to determine which reside in a personal cabinet
WTException
FolderService.getObjsInPersonalCabinets(WTCollection)
public static Foldered assignFolderByReference(Foldered theEntry, ObjectReference folderRef) throws WTException
theEntry
- folderRef
-
WTException
public static CabinetBased assignCabinetReference(CabinetBased theEntry, CabinetReference cabinetRef) throws WTException
theEntry
- cabinetRef
-
WTException
static String getFolderPath(CabinetBased object, String location)
object
- The CabinetBased object to get a path forlocation
- The location of the entry
static boolean setFolder(FolderEntry entry, Folder destination) throws WTException
entry
- destination
-
WTException
static boolean eq(Object o1, Object o2)
o1
- o2
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |