Class HttpSecurityManagedObjectAdapterSource<O extends Enum<O>>
java.lang.Object
net.officefloor.web.security.type.HttpSecurityManagedObjectAdapterSource<O>
- All Implemented Interfaces:
ManagedObjectSource<O,Indexed>
@PrivateSource
public class HttpSecurityManagedObjectAdapterSource<O extends Enum<O>>
extends Object
implements ManagedObjectSource<O,Indexed>
Adapts the
HttpSecuritySource to be a ManagedObjectSource.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionShould only be used withindoOperation(HttpSecuritySource, Runnable).HttpSecurityManagedObjectAdapterSource(HttpSecuritySource<?, ?, ?, O, ?> httpSecuritySource, Supplier<PropertyList> propertyListFactory) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionstatic <A,AC extends Serializable, C, O extends Enum<O>, F extends Enum<F>>
voiddoOperation(HttpSecuritySource<A, AC, C, O, F> httpSecuritySource, Runnable operation) Undertakes the operation for theHttpSecuritySource.HttpSecuritySourceMetaData<?,?, ?, O, ?> Obtains theHttpSecuritySourceMetaData.Obtains theHttpSecuritySupportingManagedObjectImplinstances for theHttpSecuritySource.Obtains the specification for this.init(ManagedObjectSourceContext<Indexed> context) Initialises theManagedObjectSource.voidSources aManagedObjectfrom thisManagedObjectSource.voidstart(ManagedObjectExecuteContext<Indexed> context) Called once afterManagedObjectSource.init(ManagedObjectSourceContext)to indicate thisManagedObjectSourceshould start execution.voidstop()Called to notify that theOfficeFlooris being closed.
-
Constructor Details
-
HttpSecurityManagedObjectAdapterSource
Should only be used withindoOperation(HttpSecuritySource, Runnable).- Throws:
IllegalStateException- If not being loaded within operation context.
-
HttpSecurityManagedObjectAdapterSource
public HttpSecurityManagedObjectAdapterSource(HttpSecuritySource<?, ?, ?, O, ?> httpSecuritySource, Supplier<PropertyList> propertyListFactory) Initiate.- Parameters:
httpSecuritySource-HttpSecuritySource.propertyListFactory- Factory to create aPropertyList.
-
-
Method Details
-
doOperation
public static <A,AC extends Serializable, void doOperationC, O extends Enum<O>, F extends Enum<F>> (HttpSecuritySource<A, AC, C, O, F> httpSecuritySource, Runnable operation) Undertakes the operation for theHttpSecuritySource.- Type Parameters:
A- Authentication type.AC- Access control type.C- Credentials type.O- Dependency keys type.F-Flowkeys type.- Parameters:
httpSecuritySource-HttpSecuritySource.operation-Runnablecontaining the operation to undertake.
-
getHttpSecuritySourceMetaData
Obtains theHttpSecuritySourceMetaData.- Returns:
HttpSecuritySourceMetaData.
-
getHttpSecuritySupportingManagedObjects
Obtains theHttpSecuritySupportingManagedObjectImplinstances for theHttpSecuritySource.- Returns:
HttpSecuritySupportingManagedObjectImplinstances for theHttpSecuritySource.
-
getSpecification
Description copied from interface:ManagedObjectSourceObtains the specification for this.
This will be called before any other methods, therefore this method must be able to return the specification immediately after a default constructor instantiation.
- Specified by:
getSpecificationin interfaceManagedObjectSource<O extends Enum<O>,Indexed> - Returns:
- Specification of this.
-
init
public ManagedObjectSourceMetaData<O,Indexed> init(ManagedObjectSourceContext<Indexed> context) throws Exception Description copied from interface:ManagedObjectSourceInitialises theManagedObjectSource.- Specified by:
initin interfaceManagedObjectSource<O extends Enum<O>,Indexed> - Parameters:
context-ManagedObjectSourceContextto use in initialising.- Returns:
- Meta-data to describe this.
- Throws:
Exception- Should theManagedObjectSourcefail to configure itself from the input properties.
-
start
Description copied from interface:ManagedObjectSourceCalled once after
ManagedObjectSource.init(ManagedObjectSourceContext)to indicate thisManagedObjectSourceshould start execution.On invocation of this method,
ProcessStateinstances may be invoked via theManagedObjectExecuteContext.- Specified by:
startin interfaceManagedObjectSource<O extends Enum<O>,Indexed> - Parameters:
context-ManagedObjectExecuteContextto use in starting thisManagedObjectSource.- Throws:
Exception- Should theManagedObjectSourcefail to start execution.
-
sourceManagedObject
Description copied from interface:ManagedObjectSourceSources aManagedObjectfrom thisManagedObjectSource.- Specified by:
sourceManagedObjectin interfaceManagedObjectSource<O extends Enum<O>,Indexed> - Parameters:
user-ManagedObjectUserinterested in using theManagedObject.
-
stop
public void stop()Description copied from interface:ManagedObjectSourceCalled to notify that the
OfficeFlooris being closed.On return from this method, no further
ProcessStateinstances may be invoked.
-