@Exported public class IdcContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IdcContext.HttpAuthScheme
Http authentication schema
|
static class |
IdcContext.LoginForm
Form information to allow login to clients with form-based authentication
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENCODING
default encoding
|
static String |
DEFAULT_USER
applications are using this!
|
static IdcContext.LoginForm |
JAAS_FORM
standard form configuration for an application server JAAS login
|
static String |
JSESSION_ID
default session ID cookie for Content Server
|
static IdcContext.LoginForm |
OAM_SSO_FORM
standard form configuration for OAM SSO
|
static IdcContext.LoginForm |
OIM_SSO_FORM
standard form configuration for OIM SSO
|
static String |
RIDC_INTERNAL_PARAM_PREFIX
parameter name prefix for internal-use RIDC parameters stored in parameters map
|
static String |
UCM_SESSION_ID
old cookie name used on Content Server before revision 87672 in the 11.1.1.4.0 branch (8/16/2010)
|
static String |
USER_AGENT |
Constructor and Description |
---|
IdcContext() |
IdcContext(Credentials credentials) |
IdcContext(String user) |
IdcContext(String user,
char[] password) |
IdcContext(String user,
Credentials credentials)
Deprecated.
|
IdcContext(String user,
String password)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
String value)
Add a header to this request
|
void |
clearCookies()
Clear all cookies
|
void |
clearHeaders()
Clear the available headers
|
void |
clearParameters()
Clear the available parameters
|
IdcContext.HttpAuthScheme |
getAuthScheme() |
RIDCCookie |
getCookie(String name)
Retrieve a cookie by name
|
Set<String> |
getCookieNames() |
Map<String,RIDCCookie> |
getCookies()
Retrieve the cookies map
|
Credentials |
getCredentials() |
String |
getEncoding() |
String |
getHeader(String name)
Retrieve the header value for the given name
|
Set<String> |
getHeaderNames() |
Map<String,String> |
getHeaders() |
IdcContext.LoginForm |
getLoginForm() |
Object |
getParameter(String name)
Retrieve the parameter value for the given name
|
String |
getParameterAsString(String name)
Retreieve the parameter value for the given name as a String
|
Set<String> |
getParameterNames() |
Map<String,Object> |
getParameters()
Retrieve the parameters map
|
String |
getSessionCookie()
The name of the session cookie.
|
String |
getUser() |
String |
getUserAgent() |
boolean |
hasCredentials() |
void |
recordImpersonatee(String impersonatee)
Record the name of the person being impersonated.
|
String |
retrieveImpersonatee()
Retrieve the name of the person recorded as being impersonated.
|
void |
setAuthScheme(IdcContext.HttpAuthScheme authScheme) |
void |
setCookies(Map<String,RIDCCookie> cookies)
Set the cookies to use for subsequent sendRequest() calls.
|
void |
setCredentials(Credentials credentials)
Set some credentials for this context.
|
void |
setEncoding(String encoding)
Set the encoding to use
|
void |
setLoginForm(IdcContext.LoginForm loginForm) |
void |
setParameter(String name,
Object value)
Set a parameter into this request
|
void |
setSessionCookie(String sessionCookie) |
void |
setUser(String user)
Deprecated.
|
void |
setUserAgent(String userAgent) |
public static final String USER_AGENT
public static final String JSESSION_ID
public static final String UCM_SESSION_ID
public static final String DEFAULT_ENCODING
public static final String RIDC_INTERNAL_PARAM_PREFIX
public static IdcContext.LoginForm JAAS_FORM
public static IdcContext.LoginForm OAM_SSO_FORM
public static IdcContext.LoginForm OIM_SSO_FORM
public static final String DEFAULT_USER
public IdcContext()
public IdcContext(String user)
@Deprecated public IdcContext(String user, String password)
public IdcContext(String user, char[] password)
public IdcContext(Credentials credentials)
@Deprecated public IdcContext(String user, Credentials credentials)
user
- credentials
- IllegalArgumentException
- if the user doesn't match the credential's userpublic String getUser() throws IllegalArgumentException
IllegalArgumentException
@Deprecated public void setUser(String user)
user
- the user nameIllegalArgumentException
public String retrieveImpersonatee()
public void recordImpersonatee(String impersonatee)
impersonatee
- person being impersonatedpublic boolean hasCredentials()
public Credentials getCredentials()
public void setCredentials(Credentials credentials)
credentials
- the credentialspublic String getEncoding()
public void setEncoding(String encoding)
encoding
- the encodingpublic String getUserAgent()
public void setUserAgent(String userAgent)
userAgent
- the user agent to usepublic IdcContext.LoginForm getLoginForm()
public void setLoginForm(IdcContext.LoginForm loginForm)
public IdcContext.HttpAuthScheme getAuthScheme()
public void setAuthScheme(IdcContext.HttpAuthScheme authScheme)
public String getSessionCookie()
public void setSessionCookie(String sessionCookie)
public void addHeader(String name, String value)
name
- the header namevalue
- the header valuepublic String getHeader(String name)
name
- the header namepublic void clearHeaders()
public void setCookies(Map<String,RIDCCookie> cookies)
cookies
- the cookie to leverage for new requestspublic Map<String,RIDCCookie> getCookies()
public RIDCCookie getCookie(String name)
name
- the cookie namepublic void clearCookies()
public void setParameter(String name, Object value)
name
- the header namevalue
- the header valuepublic Object getParameter(String name)
name
- the parameter namepublic String getParameterAsString(String name)
name
- the parameter namepublic void clearParameters()