|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.epm.familytable.FamilyDomainHelper
Nested Class Summary | |
private static class |
FamilyDomainHelper.DomainInfo
DomainInfo holds the old and new domain. |
Field Summary | |
private static Object |
nothing
|
Constructor Summary | |
FamilyDomainHelper()
|
Method Summary | |
static WTKeyedMap |
createDomainInfo(WTCollection documents)
Creates a DomainInfo object for each document. |
private static WTKeyedMap |
createDomainInfo(WTCollection documents,
WTKeyedMap domainByDocument)
Creates a DomainInfo object for each document. |
private static QuerySpec |
createFTQuery(WTCollection documents,
boolean useMasterID)
Returns a query spec which retrieves the family tables associated to iterations either w/the same master or on the same branch of the given documents. |
static WTKeyedMap |
filterAndCreateDomainInfo(WTCollection documents,
boolean isAllVersions)
Given a list of documents, creates a DomainInfo objects for each top generic document. |
static AdminDomainRef |
findContainsDomain(Collection containedInLinks)
Returns the domain of the "contains" documents in the given contained in links. |
static AdminDomainRef |
findDomain(Collection documents)
Given a list of family members, returns the domain of the member that is, a working copy Top Generic, a working copy Instance, a top Generic in a project, an instance in a project, or a top Generic in PDM. |
static WTKeyedMap |
findDomain(WTKeyedMap indexByFT)
Returns a WTKeyedMap whose keys are the input family tables and whose values are the corresponding AdminDomainRef. |
private static EPMDocument |
getDocumentInProject(Collection documents)
Given a list of documents, returns the top generic if it's in project. |
private static Long |
getID(EPMDocument document,
boolean useMasterID)
Returns a Long object of either Branch ID or Master ID. |
private static WTKeyedMap |
getTargetDomain(WTKeyedMap infoByDocuments,
boolean useMasterID)
Returns the family tables associated to the latest and the related document iterations. |
private static EPMDocument |
getTopGeneric(Collection documents)
Returns the top generic in the given list of documents. |
static WTCollection |
getTopGenericDocuments(WTCollection objects)
Given a list of objects, returns only the top generic documents. |
private static EPMDocument |
getWorkingCopy(Collection documents)
Given a list of documents, returns Top Generic working copy. |
static boolean |
isSameDomain(AdminDomainRef domainX,
AdminDomainRef domainY)
Returns true if the domains passed in are the same. |
protected static void |
processPostDomainChangeEvent(WTCollection domainAdministeredObjects,
WTCollection domainAdminRefs)
Updates the domain of the family table objects associated to the top generic whose domain is changed. |
private static void |
removeNoPredecessor(WTCollection iterations)
Remove the given objects w/no predecessors. |
static void |
removeUnchangedDomain(WTKeyedMap infoByDocument)
Remove objects whose domains are not changed. |
protected static WTCollection |
saveDomain(WTKeyedMap familyTables)
Sets the domain on the family tables and saves them. |
static WTCollection |
setDomainAtCheckin(WTKeyedMap ftByMember,
WTKeyedMap infoByChangedFolder,
WTKeyedMap infoByMovedContainer)
Updates the Domain of the family tables affected by the check in objects. |
private static void |
setNewDomain(WTKeyedMap infoByDocument)
Updates the new domain on DomainInfo with the document's current domain. |
private static Map |
sortByID(WTKeyedMap byDocuments,
boolean useMasterID)
Sorts the objects by the documents' master ID or branch ID. |
private static WTKeyedMap |
sortByValue(WTKeyedMap map)
Returns a WTKeyedMap w/the reversed key and value. |
private static WTKeyedMap |
toMap(WTCollection keys,
WTCollection values)
Makes a map out of the two collections. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Object nothing
Constructor Detail |
public FamilyDomainHelper()
Method Detail |
public static WTCollection setDomainAtCheckin(WTKeyedMap ftByMember, WTKeyedMap infoByChangedFolder, WTKeyedMap infoByMovedContainer) throws WTException
ftByMember
- a set of members and their family tables.infoByChangedFolder
- a map whose keys are documents w/their folders changed
and whose values are the documents' old and new domain.infoByMovedContainer
- a map whose keys are documents w/their containers moved
and whose values are the documents' old and new domain.
WTException
protected static WTCollection saveDomain(WTKeyedMap familyTables) throws WTException
familyTables
- a map whose keys are the family table and
whose values are the domain to be set.
WTException
public static WTKeyedMap findDomain(WTKeyedMap indexByFT) throws WTException
indexByFT
- a map whose keys are the family tables and
whose values are Collection of preferred family members.
WTException
private static EPMDocument getDocumentInProject(Collection documents) throws WTException
WTException
private static EPMDocument getWorkingCopy(Collection documents) throws WTException
WTException
private static EPMDocument getTopGeneric(Collection documents)
public static AdminDomainRef findDomain(Collection documents) throws WTException
WTException
public static AdminDomainRef findContainsDomain(Collection containedInLinks) throws WTException
WTException
private static WTKeyedMap toMap(WTCollection keys, WTCollection values) throws WTException
WTException
protected static void processPostDomainChangeEvent(WTCollection domainAdministeredObjects, WTCollection domainAdminRefs) throws WTException
WTException
private static Long getID(EPMDocument document, boolean useMasterID) throws WTException
WTException
private static WTKeyedMap getTargetDomain(WTKeyedMap infoByDocuments, boolean useMasterID) throws WTException
infoByDocuments
- a map whose keys are the latest documents and
whose values are the DomainInfo objects.useMasterID
- a flag indicating what iterations of the given documents
should be used to find the associated family tables.
If true, gets family tables associated to
the documents w/the given documents' masters.
Otherwise, gets family tables associated to
all iterations on the same documents' branch.
WTException
private static QuerySpec createFTQuery(WTCollection documents, boolean useMasterID) throws WTException
WTException
private static Map sortByID(WTKeyedMap byDocuments, boolean useMasterID) throws WTException
WTException
public static boolean isSameDomain(AdminDomainRef domainX, AdminDomainRef domainY) throws WTException
WTException
public static WTCollection getTopGenericDocuments(WTCollection objects) throws WTException
WTException
public static WTKeyedMap createDomainInfo(WTCollection documents) throws WTException
documents
- a list of documents which have the "old" domain.
WTException
private static WTKeyedMap createDomainInfo(WTCollection documents, WTKeyedMap domainByDocument) throws WTException
documents
- a list of documents which have the "new" domain.domainByDocument
- a map whose keys are the documents and whose values are
the "old" domain.
WTException
private static WTKeyedMap sortByValue(WTKeyedMap map) throws WTException
map
- whose keys and values are Persistable objects.
WTException
private static void setNewDomain(WTKeyedMap infoByDocument) throws WTException
WTException
public static void removeUnchangedDomain(WTKeyedMap infoByDocument) throws WTException
WTException
private static void removeNoPredecessor(WTCollection iterations) throws WTException
WTException
public static WTKeyedMap filterAndCreateDomainInfo(WTCollection documents, boolean isAllVersions) throws WTException
documents
- a list of documentsisAllVersions
- a flag indicating how to further filter the documents.
If true, keeps documents at its second or greater iteration on the version.
If false, keeps documents which have predecessors.
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |