wt.build
Class BuildServiceUtility

java.lang.Object
  extended bywt.build.BuildServiceUtility

public class BuildServiceUtility
extends Object

The BuildServiceUtility is a class that handles utility functions for the StandardBuildService class.

Supported API: false

Extendable: false


Field Summary
private static String EPMRESOURCE
           
 
Constructor Summary
BuildServiceUtility()
           
 
Method Summary
private static void dispatchBuildEvent(KeyedEvent event, List targets, String role, Class buildRuleClass, List sources, String otherSideRole)
          Dispatches build sandbox or WIP events
private static void dispatchBuildSourceEvent(WTSet links, KeyedEvent event)
           
private static void dispatchBuildTargetEvent(WTSet links, KeyedEvent event)
           
protected static WTCollection expand(WTCollection objects, Class linkClass, String otherSideRole, QuerySpec querySpec, boolean inflateOtherSideObject, boolean inflateRoleObject)
          Navigates the links of the specified class from one set of objects to another bypassing access control.
static WTKeyedMap.WTEntry getEntry(WTKeyedMap map, ObjectIdentifier objectId)
           
static WTKeyedMap.WTEntry getEntry(WTKeyedMap map, WTReference reference)
           
static WTKeyedMap.WTEntry getEntryByValue(WTKeyedMap map, ObjectIdentifier objectId)
           
static WTKeyedMap.WTEntry getEntryByValue(WTKeyedMap map, WTReference reference)
           
private static WTValuedMap getEventMap(KeyedEvent event)
          Get the event Map stored in Sandbox or WIP events
static WTKeyedMap getEventMap(KeyedEvent event, Class buildRuleClass)
           
private static List getObjectsToNavigate(String eventType, Map.Entry entry)
          Based on event type, read the Map.Entry to returns objects to be navigated to get relevant Build Rules
static WTKeyedMap getReferenceMap(WTKeyedMap eventMap)
           
private static List[] getSourcesAndTargets(String eventType, Map eventMap)
          From the Map returned by Sandbox or WIP operation, get BuildSources and BuildTargets
private static boolean isValidEvent(String eventType)
           
static void processBuildEvent(KeyedEvent event)
          Responds to multi object events emitted by WIP and SandboxService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values
Constructor Detail

BuildServiceUtility

public BuildServiceUtility()
Method Detail

processBuildEvent

public static void processBuildEvent(KeyedEvent event)
                              throws WTException
Responds to multi object events emitted by WIP and SandboxService

Parameters:
event - One of the multi object service events
Throws:
WTException

getEventMap

private static WTValuedMap getEventMap(KeyedEvent event)
Get the event Map stored in Sandbox or WIP events


dispatchBuildEvent

private static void dispatchBuildEvent(KeyedEvent event,
                                       List targets,
                                       String role,
                                       Class buildRuleClass,
                                       List sources,
                                       String otherSideRole)
                                throws WTException
Dispatches build sandbox or WIP events

Throws:
WTException

dispatchBuildTargetEvent

private static void dispatchBuildTargetEvent(WTSet links,
                                             KeyedEvent event)
                                      throws WTException
Throws:
WTException

dispatchBuildSourceEvent

private static void dispatchBuildSourceEvent(WTSet links,
                                             KeyedEvent event)
                                      throws WTException
Throws:
WTException

getObjectsToNavigate

private static List getObjectsToNavigate(String eventType,
                                         Map.Entry entry)
                                  throws WTException
Based on event type, read the Map.Entry to returns objects to be navigated to get relevant Build Rules

Returns:
List objects to be navigated
Throws:
WTException

isValidEvent

private static boolean isValidEvent(String eventType)

getSourcesAndTargets

private static List[] getSourcesAndTargets(String eventType,
                                           Map eventMap)
                                    throws WTException
From the Map returned by Sandbox or WIP operation, get BuildSources and BuildTargets

Returns:
List[] 0th location has BuildSources and 1st location has BuildTargets
Throws:
WTException

getEventMap

public static WTKeyedMap getEventMap(KeyedEvent event,
                                     Class buildRuleClass)

getReferenceMap

public static WTKeyedMap getReferenceMap(WTKeyedMap eventMap)
                                  throws WTException
Throws:
WTException

getEntry

public static WTKeyedMap.WTEntry getEntry(WTKeyedMap map,
                                          WTReference reference)

getEntryByValue

public static WTKeyedMap.WTEntry getEntryByValue(WTKeyedMap map,
                                                 WTReference reference)

getEntry

public static WTKeyedMap.WTEntry getEntry(WTKeyedMap map,
                                          ObjectIdentifier objectId)

getEntryByValue

public static WTKeyedMap.WTEntry getEntryByValue(WTKeyedMap map,
                                                 ObjectIdentifier objectId)

expand

protected static WTCollection expand(WTCollection objects,
                                     Class linkClass,
                                     String otherSideRole,
                                     QuerySpec querySpec,
                                     boolean inflateOtherSideObject,
                                     boolean inflateRoleObject)
                              throws WTException
Navigates the links of the specified class from one set of objects to another bypassing access control. The expand may return the links, the other-side objects and role object inflated or any combination of the three.

Parameters:
objects -
linkClass -
otherSideRole -
querySpec -
inflateOtherSideObject -
inflateRoleObject -
Returns:
WTCollection
Throws:
WTException