|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.activity.ActivityRequestFactory
A RequestFactory for creating activity requests. An
activity request is a request containing a collection of
Activity objects that may or may not be connected to
one another. An activity typically dictates an action to be
performed, such as a database query or data transformation.
| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement. |
private static DAILogger |
LOG
Logger object for logging in this class. |
private ActivityFactory |
mActivityFactory
Factory for creating Activity objects from request document. |
private AccessAuthorizer |
mAuthority
|
private RequestComponentFactory |
mComponentFactory
Factory for creating composite object model of the request. |
private SessionStrategyFactory |
mSessionStrategyFactory
Factory for creating session strategies. |
| Constructor Summary | |
ActivityRequestFactory(ActivityFactory activityFactory,
AccessAuthorizer authority)
Creates an instance that will use the specified activity factory. |
|
| Method Summary | |
private void |
authorizeActivities(Activity[] activities,
RequestContext context)
Authorize activities within the current request context. |
private Activity[] |
createActivities(org.w3c.dom.Document requestDocument)
Creates all of the activities described in the request document. |
Request |
createRequest(org.w3c.dom.Document document,
RequestContext context)
Create a request from the specified XML perform document. |
(package private) void |
setRequestComponentFactory(RequestComponentFactory factory)
Set the factory to be used to build the request components. |
(package private) void |
setSessionStrategyFactory(SessionStrategyFactory factory)
Set the factory to be used to build the session strategies. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private final ActivityFactory mActivityFactory
private RequestComponentFactory mComponentFactory
private SessionStrategyFactory mSessionStrategyFactory
private final AccessAuthorizer mAuthority
| Constructor Detail |
public ActivityRequestFactory(ActivityFactory activityFactory,
AccessAuthorizer authority)
activityFactory - ActivityFactory to use for creating the
activities described in the request documentsauthority - authorizes access to activities| Method Detail |
public Request createRequest(org.w3c.dom.Document document,
RequestContext context)
throws RequestSpecificationException,
RequestExecutionException,
ActivityAccessAuthorizationException
RequestFactory
createRequest in interface RequestFactorydocument - a perform document to build the request from.context - context of the request.
Request ready for submission to a
RequestEngine.
RequestSpecificationException - if the request is incorrectly specified e.g. does not match
the perform document schema or contains an unsupported
activity.
ActivityAccessAuthorizationException - if an activity could not be authorized
RequestExecutionException - if some problem prevents creation of the request.
private Activity[] createActivities(org.w3c.dom.Document requestDocument)
throws RequestSpecificationException,
RequestCreationException
requestDocument - Request (perform) document.
RequestSpecificationException - If the request is incorrectly specified.
RequestCreationException - If there is a problem encountered when creating the activities.
private void authorizeActivities(Activity[] activities,
RequestContext context)
throws ActivityAccessAuthorizationException
activities - activities to authorizecontext - the current request context containing the security context
and the resource ID
ActivityAccessAuthorizationException - if the user is not authorized to access one of the activitiesvoid setRequestComponentFactory(RequestComponentFactory factory)
Assists with testing.
factory - Factory for request components.void setSessionStrategyFactory(SessionStrategyFactory factory)
Assists with testing.
factory - Factory for session strategies.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||