Class HttpSecurityManagedObjectAdapterSource<O extends java.lang.Enum<O>>
- java.lang.Object
-
- net.officefloor.web.security.type.HttpSecurityManagedObjectAdapterSource<O>
-
- All Implemented Interfaces:
ManagedObjectSource<O,Indexed>
@PrivateSource public class HttpSecurityManagedObjectAdapterSource<O extends java.lang.Enum<O>> extends java.lang.Object implements ManagedObjectSource<O,Indexed>
Adapts theHttpSecuritySourceto be aManagedObjectSource.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description HttpSecurityManagedObjectAdapterSource()Should only be used withindoOperation(HttpSecuritySource, Runnable).HttpSecurityManagedObjectAdapterSource(HttpSecuritySource<?,?,?,O,?> httpSecuritySource, java.util.function.Supplier<PropertyList> propertyListFactory)Initiate.
-
Method Summary
-
-
-
Constructor Detail
-
HttpSecurityManagedObjectAdapterSource
public HttpSecurityManagedObjectAdapterSource() throws java.lang.IllegalStateExceptionShould only be used withindoOperation(HttpSecuritySource, Runnable).- Throws:
java.lang.IllegalStateException- If not being loaded within operation context.
-
HttpSecurityManagedObjectAdapterSource
public HttpSecurityManagedObjectAdapterSource(HttpSecuritySource<?,?,?,O,?> httpSecuritySource, java.util.function.Supplier<PropertyList> propertyListFactory)
Initiate.- Parameters:
httpSecuritySource-HttpSecuritySource.propertyListFactory- Factory to create aPropertyList.
-
-
Method Detail
-
doOperation
public static <A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> void doOperation(HttpSecuritySource<A,AC,C,O,F> httpSecuritySource, java.lang.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
public HttpSecuritySourceMetaData<?,?,?,O,?> getHttpSecuritySourceMetaData()
Obtains theHttpSecuritySourceMetaData.- Returns:
HttpSecuritySourceMetaData.
-
getHttpSecuritySupportingManagedObjects
public HttpSecuritySupportingManagedObjectImpl<?>[] getHttpSecuritySupportingManagedObjects()
Obtains theHttpSecuritySupportingManagedObjectImplinstances for theHttpSecuritySource.- Returns:
HttpSecuritySupportingManagedObjectImplinstances for theHttpSecuritySource.
-
getSpecification
public ManagedObjectSourceSpecification 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 java.lang.Enum<O>,Indexed>- Returns:
- Specification of this.
-
init
public ManagedObjectSourceMetaData<O,Indexed> init(ManagedObjectSourceContext<Indexed> context) throws java.lang.Exception
Description copied from interface:ManagedObjectSourceInitialises theManagedObjectSource.- Specified by:
initin interfaceManagedObjectSource<O extends java.lang.Enum<O>,Indexed>- Parameters:
context-ManagedObjectSourceContextto use in initialising.- Returns:
- Meta-data to describe this.
- Throws:
java.lang.Exception- Should theManagedObjectSourcefail to configure itself from the input properties.
-
start
public void start(ManagedObjectExecuteContext<Indexed> context) throws java.lang.Exception
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 java.lang.Enum<O>,Indexed>- Parameters:
context-ManagedObjectExecuteContextto use in starting thisManagedObjectSource.- Throws:
java.lang.Exception- Should theManagedObjectSourcefail to start execution.
-
sourceManagedObject
public void sourceManagedObject(ManagedObjectUser user)
Description copied from interface:ManagedObjectSourceSources aManagedObjectfrom thisManagedObjectSource.- Specified by:
sourceManagedObjectin interfaceManagedObjectSource<O extends java.lang.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.- Specified by:
stopin interfaceManagedObjectSource<O extends java.lang.Enum<O>,Indexed>
-
-