Class AbstractRegistrationServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- org.oa4mp.server.api.storage.servlet.EnvServlet
-
- org.oa4mp.server.api.storage.servlet.OA4MPServlet
-
- org.oa4mp.server.api.storage.servlet.AbstractRegistrationServlet
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,edu.uiuc.ncsa.security.servlet.Presentable,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,org.oa4mp.delegation.common.servlet.TransactionFilter
- Direct Known Subclasses:
RegistrationServlet
public abstract class AbstractRegistrationServlet extends OA4MPServlet implements edu.uiuc.ncsa.security.servlet.Presentable
Created by Jeff Gaynor
on 10/3/14 at 10:46 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractRegistrationServlet.ClientRegistrationRetryExceptionprotected static classAbstractRegistrationServlet.ClientState
-
Field Summary
Fields Modifier and Type Field Description static StringCLIENT_ACTION_KEYstatic StringCLIENT_ACTION_REQUEST_VALUEstatic StringCLIENT_EMAILstatic StringCLIENT_ERROR_URLstatic StringCLIENT_HOME_URLstatic StringCLIENT_IS_PUBLICstatic StringCLIENT_NAMEstatic StringCLIENT_PROXY_LIMITEDstatic StringCLIENT_PUBLIC_KEYprotected StringemailPatternstatic StringERROR_PAGEThe name of a JSP page to display in case of errors.protected static intERROR_STATEstatic StringINIT_PAGEThe page to display to the client for the initial request.protected static intINITIAL_STATEstatic StringOK_PAGEIf the registration works, this is the page to display to the user afterwards.protected static intREQUEST_STATE-
Fields inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
caThread, kpt, lastAccessedThread, transactionCleanup
-
Fields inherited from class org.oa4mp.server.api.storage.servlet.EnvServlet
ERROR_NOTIFICATION_BODY_KEY, ERROR_NOTIFICATION_SUBJECT_KEY, notificationListeners, storeUpdatesDone
-
-
Constructor Summary
Constructors Constructor Description AbstractRegistrationServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.oa4mp.delegation.common.storage.clients.BaseClientaddNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidfireNewClientEvent(NewClientEvent newClientEvent)protected StringgetErrorPage()protected StringgetInitPage()protected StringgetOKPage()protected StringgetParameter(javax.servlet.http.HttpServletRequest req, String key)protected StringgetRequiredParam(javax.servlet.http.HttpServletRequest req, String key, org.oa4mp.delegation.common.storage.clients.BaseClient client)intgetState(javax.servlet.http.HttpServletRequest request)protected StringgetValueTag(String key)For a key (e.g. clientName) the associated form value is usually name+"Value" (e.g. clientNameValue).voidhandleError(edu.uiuc.ncsa.security.servlet.PresentableState state, Throwable t)voidprepare(edu.uiuc.ncsa.security.servlet.PresentableState state)voidpresent(edu.uiuc.ncsa.security.servlet.PresentableState state)protected voidsave(org.oa4mp.delegation.common.storage.clients.BaseClient client)protected voidsetRetryParameters(javax.servlet.http.HttpServletRequest request, edu.uiuc.ncsa.security.core.exceptions.RetryException r)Sets the parameters from the request so they can be passed back.protected org.oa4mp.delegation.common.storage.clients.BaseClientsetupNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)ServiceTransactionverifyAndGet(IssuerResponse iResponse)This is called after the response is received so that the system can get the approproate transaction.-
Methods inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
checkAdminClientStatus, checkClientApproval, createDebugger, destroy, getAGI, getATI, getClient, getClient, getClient, getFirstParameters, getFirstParameterValue, getGrantIDFromRequest, getServiceEnvironment, getTransaction, getTransactionByGrantID, getTransactionStore, isEmpty, loadProperties2, newTransaction, postprocess, preprocess, realStoreUpdates, say, shutdownCleanup, storeUpdates
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.EnvServlet
addNotificationListener, loadEnvironment, processStoreCheck, removeNotificationListener
-
Methods inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
checkContentType, CONST, debug, doGet, doPing, doPost, error, error, getConfigurationLoader, getEnvironment, getExceptionHandler, getInitialization, getMyLogger, getRequestIPAddress, handleException, info, init, isDebugOn, logOK, logOK, printAllParameters, printAllParameters, resetState, setConfigurationLoader, setDebugOn, setEnvironment, setExceptionHandler, setInitialization, warn
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
CLIENT_NAME
public static final String CLIENT_NAME
- See Also:
- Constant Field Values
-
CLIENT_PUBLIC_KEY
public static final String CLIENT_PUBLIC_KEY
- See Also:
- Constant Field Values
-
CLIENT_HOME_URL
public static final String CLIENT_HOME_URL
- See Also:
- Constant Field Values
-
CLIENT_ERROR_URL
public static final String CLIENT_ERROR_URL
- See Also:
- Constant Field Values
-
CLIENT_EMAIL
public static final String CLIENT_EMAIL
- See Also:
- Constant Field Values
-
CLIENT_PROXY_LIMITED
public static final String CLIENT_PROXY_LIMITED
- See Also:
- Constant Field Values
-
CLIENT_IS_PUBLIC
public static final String CLIENT_IS_PUBLIC
- See Also:
- Constant Field Values
-
CLIENT_ACTION_KEY
public static final String CLIENT_ACTION_KEY
- See Also:
- Constant Field Values
-
CLIENT_ACTION_REQUEST_VALUE
public static final String CLIENT_ACTION_REQUEST_VALUE
- See Also:
- Constant Field Values
-
INITIAL_STATE
protected static final int INITIAL_STATE
- See Also:
- Constant Field Values
-
ERROR_STATE
protected static final int ERROR_STATE
- See Also:
- Constant Field Values
-
REQUEST_STATE
protected static final int REQUEST_STATE
- See Also:
- Constant Field Values
-
INIT_PAGE
public static String INIT_PAGE
The page to display to the client for the initial request.
-
ERROR_PAGE
public static String ERROR_PAGE
The name of a JSP page to display in case of errors. The default is "registration-error.jsp".
-
OK_PAGE
public static String OK_PAGE
If the registration works, this is the page to display to the user afterwards.
-
emailPattern
protected String emailPattern
-
-
Method Detail
-
verifyAndGet
public ServiceTransaction verifyAndGet(IssuerResponse iResponse) throws IOException
Description copied from class:OA4MPServletThis is called after the response is received so that the system can get the approproate transaction. Checks for the validity of the transaction should be done here too.- Specified by:
verifyAndGetin classOA4MPServlet- Returns:
- Throws:
IOException
-
getState
public int getState(javax.servlet.http.HttpServletRequest request)
-
fireNewClientEvent
protected void fireNewClientEvent(NewClientEvent newClientEvent)
-
prepare
public void prepare(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable- Specified by:
preparein interfaceedu.uiuc.ncsa.security.servlet.Presentable- Throws:
Throwable
-
getInitPage
protected String getInitPage()
-
getErrorPage
protected String getErrorPage()
-
getOKPage
protected String getOKPage()
-
present
public void present(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable- Specified by:
presentin interfaceedu.uiuc.ncsa.security.servlet.Presentable- Throws:
Throwable
-
handleError
public void handleError(edu.uiuc.ncsa.security.servlet.PresentableState state, Throwable t) throws IOException, javax.servlet.ServletException- Specified by:
handleErrorin interfaceedu.uiuc.ncsa.security.servlet.Presentable- Throws:
IOExceptionjavax.servlet.ServletException
-
getValueTag
protected String getValueTag(String key)
For a key (e.g. clientName) the associated form value is usually name+"Value" (e.g. clientNameValue). This method creates these value tags.- Parameters:
key-- Returns:
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable- Specified by:
doItin classedu.uiuc.ncsa.security.servlet.AbstractServlet- Throws:
Throwable
-
save
protected void save(org.oa4mp.delegation.common.storage.clients.BaseClient client)
-
setRetryParameters
protected void setRetryParameters(javax.servlet.http.HttpServletRequest request, edu.uiuc.ncsa.security.core.exceptions.RetryException r)Sets the parameters from the request so they can be passed back.- Parameters:
request-r-
-
getRequiredParam
protected String getRequiredParam(javax.servlet.http.HttpServletRequest req, String key, org.oa4mp.delegation.common.storage.clients.BaseClient client)
-
setupNewClient
protected org.oa4mp.delegation.common.storage.clients.BaseClient setupNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable- Throws:
Throwable
-
-