Package net.shibboleth.sp.profile.impl
Class DoStorageOperation
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.sp.profile.AbstractAgentRequestAction
net.shibboleth.sp.profile.AbstractAgentAction
net.shibboleth.sp.profile.impl.DoStorageOperation
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that implements a remote API for SP agents to access or alter
StorageService records.
All contexts are prefixed with IdentifiedComponent.getId() to prevent conflicts across agents.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.INVALID_MESSAGE,EventIds.IO_ERROR,DUPLICATE_RECORD,RECORD_NOT_FOUND,VERSION_MISMATCH- Precondition:
AgentRequestContext.getOutput().isstruct()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringInput member for storage context.static final StringCustom event for duplicate record on creation.static final StringMember for storage expiration.private DDFInput message.static final StringInput member for storage key.private org.slf4j.LoggerClass logger.static final StringInput member for operation.private DDFOutput message.static final StringCustom event for duplicate record on creation.private StorageServiceStorageServiceto operate on.static final StringMember for storage value.static final StringMember for storage version.static final StringCustom event for version mismatch on conditional update. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddoCreate(ProfileRequestContext profileRequestContext) Perform create operation.private voiddoDelete(ProfileRequestContext profileRequestContext) Perform delete operation.protected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) private voiddoRead(ProfileRequestContext profileRequestContext) Perform read operation.private voiddoUpdate(ProfileRequestContext profileRequestContext) Perform update operation.voidsetStorageService(StorageService storage) Sets theStorageServiceto use.Methods inherited from class net.shibboleth.sp.profile.AbstractAgentAction
ensureAgent, getAgentMethods inherited from class net.shibboleth.sp.profile.AbstractAgentRequestAction
ensureAgentRequestContext, getAgentRequestContext, setAgentRequestContextLookupStrategyMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
RECORD_NOT_FOUND
Custom event for duplicate record on creation.- See Also:
-
DUPLICATE_RECORD
Custom event for duplicate record on creation.- See Also:
-
VERSION_MISMATCH
Custom event for version mismatch on conditional update.- See Also:
-
OP
Input member for operation.- See Also:
-
CONTEXT
Input member for storage context.- See Also:
-
KEY
Input member for storage key.- See Also:
-
VALUE
Member for storage value.- See Also:
-
EXP
Member for storage expiration.- See Also:
-
VERSION
Member for storage version.- See Also:
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
storageService
StorageServiceto operate on. -
input
Input message. -
output
Output message.
-
-
Constructor Details
-
DoStorageOperation
public DoStorageOperation()
-
-
Method Details
-
setStorageService
Sets theStorageServiceto use.- Parameters:
storage- storage service
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractAgentAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
doCreate
Perform create operation.- Parameters:
profileRequestContext- profile request context- Throws:
IOException- if an error is raised
-
doRead
Perform read operation.- Parameters:
profileRequestContext- profile request context- Throws:
IOException- if an error is raised
-
doUpdate
Perform update operation.- Parameters:
profileRequestContext- profile request context- Throws:
IOException- if an error is raised
-
doDelete
Perform delete operation.- Parameters:
profileRequestContext- profile request context- Throws:
IOException- if an error is raised
-