wt.ixb.objectset
Class ObjectSetHelper

java.lang.Object
  extended bywt.ixb.objectset.ObjectSetHelper

public class ObjectSetHelper
extends Object


Nested Class Summary
private static class ObjectSetHelper.ComputeObjectSetVisitor
           
 
Field Summary
private static Object lock
           
static int OBJECT_PAGE_SIZE
           
private static IxbDocument objectSetRegistry
           
static String XML_TAG_DISPLAY_SEPERATE
           
static String XML_TAG_SEARCH_CLASS
           
 
Constructor Summary
ObjectSetHelper()
           
 
Method Summary
static int accumulateObjectsToPageForGeneratorsAndFilters(WTHashSet structuredObjects, ObjectSetGeneratorInfo[] gens, ObjectSetFilterInfo[] fils, WTContainerRef sourceContainer, int currentIndex, int pageSize)
           
static int accumulateObjectsToPageForGeneratorsAndFilters(WTHashSet structuredObjects, String[] generatorIds, String[] generatorParams, String[] filterIds, String[] filterParams, WTContainerRef sourceContainer, int currentIndex, int pageSize)
           
static Set computeObjectSetForGeneratorAndFilters(ObjectSetGenerator generator, ObjectSetFilter[] filters, WTContainerRef sourceContainer)
           
static Set computeObjectSetForGivenGeneratorsAndFilters(String[] generatorIds, String[] generatorParams, String[] filterIds, String[] filterParams)
           
static Set computeObjectSetForGivenGeneratorsAndFilters(String[] generatorIds, String[] generatorParams, String[] filterIds, String[] filterParams, WTContainerRef sourceContainer)
           
private static ConfigSpec getConfigSpec(Object obj)
           
private static ConfigSpec getEPMDocConfigSpec(EPMDocument doc)
           
static Vector getListOfObjectSetFilters(boolean displayablenly)
          Get all object set filters as Vector.
static Vector getListOfObjectSetGenerators(boolean displayablenly)
          Get all object set generators as Vector.
static Vector getListOfObjectSetHandlerIds(String searchClassName, boolean exactClassMatch)
          Get all object set generator information applicable to the class with name searchClassName as a Vector.
private static Vector getListOfObjectSetHandlers(String handlerType)
           
static Object getNonWorkingCopyInPublicDomain(Object ob)
          If the given object is a working copy of Workable, the object is substituted by its predecessor; And finally, if the modified object is in Personal Cabinet, return null;
private static ConfigSpec getPartConfigSpec(WTPart part)
           
private static ConfigSpec getWTDocConfigSpec(WTDocument doc)
           
static boolean isLinkLinkingObjInPersonalCabinetOrWorkingCopy(ObjectToObjectLink link)
          For a given ObjectToObjectLink object, test whether either of its linked objects is either a working copy or in personal cabinet
static boolean isWorkingCopyOrInPersonalCabinet(Persistable ob)
          Test the target object is a working copy or in personal cabinet..
static ObjectSetFilter newObjectSetFilter(String filterId)
           
static ObjectSetGenerator newObjectSetGenerator(String generatorId)
           
static ObjectSetGenerator newObjectSetGenerator(String generatorId, WTContainerRef container)
           
static ObjectSetGenerator newObjectSetGenerator(String generatorId, WTContainerRef container, ConfigSpec configSpec)
           
private static ObjectSetHandler newObjectSetHandler(String handlerType, String handlerId)
           
private static boolean objectShldSkipForConfigSpec(String oid, WTContainerRef container)
          Testing if the object should be excluded from being exported because of the "current" configuration Return true if yes
private static void PP(String s)
           
private static void prepareObjectSetRegistry()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectSetRegistry

private static IxbDocument objectSetRegistry

lock

private static Object lock

XML_TAG_DISPLAY_SEPERATE

public static final String XML_TAG_DISPLAY_SEPERATE
See Also:
Constant Field Values

XML_TAG_SEARCH_CLASS

public static final String XML_TAG_SEARCH_CLASS
See Also:
Constant Field Values

OBJECT_PAGE_SIZE

public static int OBJECT_PAGE_SIZE
Constructor Detail

ObjectSetHelper

public ObjectSetHelper()
Method Detail

prepareObjectSetRegistry

private static void prepareObjectSetRegistry()
                                      throws WTException
Throws:
WTException

getListOfObjectSetGenerators

public static Vector getListOfObjectSetGenerators(boolean displayablenly)
                                           throws WTException
Get all object set generators as Vector. Each element in the vector will be the display ID as a String. If parameter displayablenly is set to true, then only generators which are set displayable will be returned, otherwise all generators will be returned.

Supported API: true

Returns:
Vector
Throws:
WTException

getListOfObjectSetFilters

public static Vector getListOfObjectSetFilters(boolean displayablenly)
                                        throws WTException
Get all object set filters as Vector. Each element in the vector will be the display ID as a String. If parameter displayablenly is set to true, then only filters which are set displayable will be returned, otherwise all filters will be returned.

Supported API: true

Returns:
Vector
Throws:
WTException

getListOfObjectSetHandlers

private static Vector getListOfObjectSetHandlers(String handlerType)
                                          throws WTException
Throws:
WTException

getListOfObjectSetHandlerIds

public static Vector getListOfObjectSetHandlerIds(String searchClassName,
                                                  boolean exactClassMatch)
                                           throws WTException
Get all object set generator information applicable to the class with name searchClassName as a Vector. Eelements in the vector are String, representing the generator ID. If parameter exactClassSearch is false, all generators applicable to this class and its parent classes will be returned; otherwise only generators for this class will be returned.

Supported API: true

Parameters:
searchClassName -
Returns:
Vector
Throws:
WTException

computeObjectSetForGivenGeneratorsAndFilters

public static Set computeObjectSetForGivenGeneratorsAndFilters(String[] generatorIds,
                                                               String[] generatorParams,
                                                               String[] filterIds,
                                                               String[] filterParams)
                                                        throws WTException
Throws:
WTException

computeObjectSetForGivenGeneratorsAndFilters

public static Set computeObjectSetForGivenGeneratorsAndFilters(String[] generatorIds,
                                                               String[] generatorParams,
                                                               String[] filterIds,
                                                               String[] filterParams,
                                                               WTContainerRef sourceContainer)
                                                        throws WTException
Throws:
WTException

computeObjectSetForGeneratorAndFilters

public static Set computeObjectSetForGeneratorAndFilters(ObjectSetGenerator generator,
                                                         ObjectSetFilter[] filters,
                                                         WTContainerRef sourceContainer)
                                                  throws WTException
Throws:
WTException

accumulateObjectsToPageForGeneratorsAndFilters

public static int accumulateObjectsToPageForGeneratorsAndFilters(WTHashSet structuredObjects,
                                                                 String[] generatorIds,
                                                                 String[] generatorParams,
                                                                 String[] filterIds,
                                                                 String[] filterParams,
                                                                 WTContainerRef sourceContainer,
                                                                 int currentIndex,
                                                                 int pageSize)
                                                          throws WTException
Throws:
WTException

accumulateObjectsToPageForGeneratorsAndFilters

public static int accumulateObjectsToPageForGeneratorsAndFilters(WTHashSet structuredObjects,
                                                                 ObjectSetGeneratorInfo[] gens,
                                                                 ObjectSetFilterInfo[] fils,
                                                                 WTContainerRef sourceContainer,
                                                                 int currentIndex,
                                                                 int pageSize)
                                                          throws WTException
Throws:
WTException

newObjectSetGenerator

public static ObjectSetGenerator newObjectSetGenerator(String generatorId)
                                                throws WTException
Throws:
WTException

newObjectSetGenerator

public static ObjectSetGenerator newObjectSetGenerator(String generatorId,
                                                       WTContainerRef container)
                                                throws WTException
Throws:
WTException

newObjectSetGenerator

public static ObjectSetGenerator newObjectSetGenerator(String generatorId,
                                                       WTContainerRef container,
                                                       ConfigSpec configSpec)
                                                throws WTException
Parameters:
generatorId - ObjectSetGenerator id from registry
container - Source context
configSpec - Custom config spec to be used during navigation of structures
Returns:
ObjectSetGenerator instance
Throws:
WTException

newObjectSetFilter

public static ObjectSetFilter newObjectSetFilter(String filterId)
                                          throws WTException
Throws:
WTException

newObjectSetHandler

private static ObjectSetHandler newObjectSetHandler(String handlerType,
                                                    String handlerId)
                                             throws WTException
Throws:
WTException

isWorkingCopyOrInPersonalCabinet

public static boolean isWorkingCopyOrInPersonalCabinet(Persistable ob)
                                                throws WTException
Test the target object is a working copy or in personal cabinet..

Throws:
WTException

getNonWorkingCopyInPublicDomain

public static Object getNonWorkingCopyInPublicDomain(Object ob)
                                              throws WTException
If the given object is a working copy of Workable, the object is substituted by its predecessor; And finally, if the modified object is in Personal Cabinet, return null;

Throws:
WTException

isLinkLinkingObjInPersonalCabinetOrWorkingCopy

public static boolean isLinkLinkingObjInPersonalCabinetOrWorkingCopy(ObjectToObjectLink link)
                                                              throws WTException
For a given ObjectToObjectLink object, test whether either of its linked objects is either a working copy or in personal cabinet

Throws:
WTException

PP

private static void PP(String s)

objectShldSkipForConfigSpec

private static boolean objectShldSkipForConfigSpec(String oid,
                                                   WTContainerRef container)
                                            throws WTException
Testing if the object should be excluded from being exported because of the "current" configuration Return true if yes

Throws:
WTException

getConfigSpec

private static ConfigSpec getConfigSpec(Object obj)
                                 throws WTException
Throws:
WTException

getPartConfigSpec

private static ConfigSpec getPartConfigSpec(WTPart part)
                                     throws WTException
Throws:
WTException

getWTDocConfigSpec

private static ConfigSpec getWTDocConfigSpec(WTDocument doc)
                                      throws WTException
Throws:
WTException

getEPMDocConfigSpec

private static ConfigSpec getEPMDocConfigSpec(EPMDocument doc)
                                       throws WTException
Throws:
WTException