|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.orchestranetworks.ui.UIHttpManagerComponent
This class is a utility for calling EBX.Manager through a HTTP request.
A general introduction to EBX.Manager component is available here.
The authentication process is the following:
createOnServiceContext(ServiceContext)
or createOnUIBeanContext(UIResponseContext))
the authentication is automatic and the new
Session
inherits its features from the calling session.
login and password are specified
through method setUserLoginPassword(String, String), the method
Directory.authenticateUserFromLoginPassword(String, String)
is called. If user is not authenticated, an access denied page is returned.
Directory.authenticateUserFromHttpRequest(HttpServletRequest)
is called (it is up to the specific directory to implement this method).
If the method throws an exception, an access denied page is returned.
If the method returns null (default implementation), the request is considered
as not specifying authentication, so the next step is performed.
Directory.authenticateUserFromLoginPassword(String, String)
will be called.
| Method Summary | |
static UIHttpManagerComponent |
createOnServiceContext(ServiceContext aContext)
Creates an instance of this class for calling EBX.Manager from a ServiceContext. |
static UIHttpManagerComponent |
createOnUIBeanContext(UIResponseContext aContext)
Creates an instance of this class for calling EBX.Manager from a UI component context. |
static UIHttpManagerComponent |
createWithBaseURI(String baseURI)
Creates an instance of this class for calling EBX.Manager from an external application. |
static UIHttpManagerComponent |
createWithBaseURI(String baseURI,
AdaptationName aManagerReference)
Creates an instance of this class for calling EBX.Manager from an external application. |
HomeKey |
getHomeKey()
|
List |
getHttpParameterNames()
Returns the names of the HTTP parameters that are specified by this instance. |
String |
getHttpParameterValue(String aParameterName)
Returns a String object as the value of the parameter, null if parameter
is not defined.
|
AdaptationReference |
getInstanceReference()
|
Locale |
getLocale()
Returns the locale specified for the new user session, null if no specific
locale has been set. |
String |
getRedirectionURI()
Returns the URI that will be used to redirect user after closing EBX.Manager session. |
ServiceKey |
getService()
Returns the service to activate, null if no specific service
has been set. |
String |
getTrackingInfo()
Returns the tracking info for the new user session, null
if no specifi tracking info has been set. |
abstract String |
getURIWithoutParameters()
This function returns the URI to EBX.Manager, without specific parameters. |
String |
getURIWithParameters()
This function returns the URI to EBX.Manager, including parameters specified by this instance. |
String |
getUserLogin()
Returns the user login, null if no login/password is specified. |
String |
getUserPassword()
Returns the user password, null if no login/password is specified. |
String |
getXPathString()
|
void |
initFromHttpRequest(HttpServletRequest request)
Initializes this instance with the incoming request specified. |
void |
select(HomeKey aHomeKey,
AdaptationName anInstanceReference,
Path aPath)
Selects the node in the instance specified. |
void |
select(HomeKey aHomeKey,
AdaptationName anInstanceReference,
String aXPathExpression)
Specifies a selection onto a Master Data entity. |
void |
selectHome(AdaptationHome aHome)
Selects the home (branch or version) specified. |
void |
selectHome(HomeKey aHomeKey)
Selects the home (branch or version) specified. |
void |
selectInstance(HomeKey aHomeKey,
AdaptationName anInstanceReference)
Selects the instance specified. |
void |
selectInstanceOrOccurrence(Adaptation anAdaptation)
Selects the entity specified, an instance or an occurrence. |
void |
selectInstanceOrOccurrenceWithPredicate(Adaptation anAdaptation,
String predicate)
Selects the entity specified, an instance or an occurrence with the predicate restriction |
void |
selectNode(Adaptation anAdaptation,
Path aNode)
Selects the node specified. |
void |
selectNode(Adaptation anAdaptation,
Path aNode,
String predicate)
Selects the node specified with the predicate restriction |
void |
setLocale(Locale locale)
Specifies the locale for the new user session. |
void |
setRedirectionURI(String redirectionUrl)
Specifies the URI that will be used to redirect user after closing EBX.Manager session. |
void |
setService(ServiceKey aServiceKey)
Specifies the service to activate. |
void |
setTrackingInfo(String trackingInfo)
Specifies the tracking info for the new user session. |
void |
setUserLoginPassword(String userLogin,
String userPassword)
Specifies the login and password for authenticating the user. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static UIHttpManagerComponent createWithBaseURI(String baseURI)
baseURI - Base URI to EBX.Platform web application.createWithBaseURI(String, AdaptationName)
public static UIHttpManagerComponent createWithBaseURI(String baseURI,
AdaptationName aManagerReference)
The default deployment requires a URL base that has the following form:
http://<host>[:<port>]/ebx/
Or, if the Java application is running on the same application server:
/ebx/
Note: More formally, the URI base must refer to the servlet named
com.onwbp.front.FrontServlet defined
in the Web application ebx.war (see file /WEB-INF/web.xml
in ebx.war).
baseURI - Base URI to EBX.Platform web application (see examples above).aManagerReference - Identifier of EBX.Manager adaptation (for example, ebxmanager-1.0).public static UIHttpManagerComponent createOnServiceContext(ServiceContext aContext)
ServiceContext.
public static UIHttpManagerComponent createOnUIBeanContext(UIResponseContext aContext)
public abstract String getURIWithoutParameters()
getURIWithParameters(),
getHttpParameterNames(),
getHttpParameterValue(String)public String getURIWithParameters()
Warning: this method may return a String whose length is not supported by the browser or the Servlet Container.
User authentication parameters have to be added according to current user directory implementation.
Directory.authenticateUserFromHttpRequest(HttpServletRequest)public List getHttpParameterNames()
Since method getURIWithParameters() may lead to a too long URI, this method may be used
for building a POST request .
getHttpParameterValue(String)public String getHttpParameterValue(String aParameterName)
null if parameter
is not defined.
getHttpParameterNames()
public void initFromHttpRequest(HttpServletRequest request)
throws IllegalArgumentException
This method can be used to "forward" Manager Component parameters to another page so that it is able to perform the actual call.
IllegalArgumentExceptionpublic String getUserLogin()
null if no login/password is specified.
setUserLoginPassword(String, String)public String getUserPassword()
null if no login/password is specified.
setUserLoginPassword(String, String)
public void setUserLoginPassword(String userLogin,
String userPassword)
The authentication process is detailled in this class comment.
public HomeKey getHomeKey()
public AdaptationReference getInstanceReference()
public String getXPathString()
public void selectHome(HomeKey aHomeKey)
IllegalArgumentException - if aHomeKey is null.
public void selectInstance(HomeKey aHomeKey,
AdaptationName anInstanceReference)
IllegalArgumentException - if aHomeKey is null
or anInstanceReference is null.
public void select(HomeKey aHomeKey,
AdaptationName anInstanceReference,
Path aPath)
IllegalArgumentException - if aHomeKey is null.
public void select(HomeKey aHomeKey,
AdaptationName anInstanceReference,
String aXPathExpression)
throws IllegalArgumentException
This method is the most general one for doing an entity selection.
aHomeKey - branch or version.anInstanceReference - reference to an instance in the home. If null,
this method is same as selectHome(HomeKey).aXPathExpression - XPath expression that specifies a selection in the instance.
If null and instance not null,
this method is same as selectInstance(HomeKey, AdaptationName).
IllegalArgumentException - if aHomeKey is null, or anInstanceReference
is null but not aXPathExpression.public void selectHome(AdaptationHome aHome)
IllegalArgumentException - if aHome is null.public void selectInstanceOrOccurrence(Adaptation anAdaptation)
IllegalArgumentException - if anAdaptation is null.
public void selectInstanceOrOccurrenceWithPredicate(Adaptation anAdaptation,
String predicate)
predicate - the predicate which precise the selection
IllegalArgumentException - if anAdaptation is null.
public void selectNode(Adaptation anAdaptation,
Path aNode)
anAdaptation - an instance or an occurrence.aNode - a path to a node in the adaptation; if null this method
is same as selectInstanceOrOccurrence(Adaptation).
IllegalArgumentException - if anAdaptation is null.
public void selectNode(Adaptation anAdaptation,
Path aNode,
String predicate)
anAdaptation - an instance or an occurrence.aNode - a path to a node in the adaptation; if null this method
is same as selectInstanceOrOccurrence(Adaptation).predicate - the predicate which precise the selection
IllegalArgumentException - if anAdaptation is null.public ServiceKey getService()
null if no specific service
has been set.
public void setService(ServiceKey aServiceKey)
The built-in service ServiceKey.VALIDATION can be activated on
a home.
The built-in service ServiceKey.CREATE can be activated only
if a table node is selected.
aServiceKey - The service that must be activated when Manager Component is called,
null if no specific service has to be activated.public String getRedirectionURI()
public void setRedirectionURI(String redirectionUrl)
The URI will have an additional HTTP parameter that specifies a return code. The application
that receives the URI can extract it by means of method
UIHttpManagerComponentHelper.getReturnCodeFromHttpRequest(HttpServletRequest).
UIHttpManagerComponentReturnCodepublic String getTrackingInfo()
null
if no specifi tracking info has been set.
Session.getTrackingInfo()public void setTrackingInfo(String trackingInfo)
Session.getTrackingInfo()public Locale getLocale()
null if no specific
locale has been set.
Session.getLocale()public void setLocale(Locale locale)
Session.getLocale()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
(report a bug)
EBX.Platform 4.5.0 [0598]
Copyright Orchestra Networks 2000-2008. All rights reserved.