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 theHttpSecuritySource
to 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.IllegalStateException
Should 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
-Flow
keys type.- Parameters:
httpSecuritySource
-HttpSecuritySource
.operation
-Runnable
containing the operation to undertake.
-
getHttpSecuritySourceMetaData
public HttpSecuritySourceMetaData<?,?,?,O,?> getHttpSecuritySourceMetaData()
Obtains theHttpSecuritySourceMetaData
.- Returns:
HttpSecuritySourceMetaData
.
-
getHttpSecuritySupportingManagedObjects
public HttpSecuritySupportingManagedObjectImpl<?>[] getHttpSecuritySupportingManagedObjects()
Obtains theHttpSecuritySupportingManagedObjectImpl
instances for theHttpSecuritySource
.- Returns:
HttpSecuritySupportingManagedObjectImpl
instances for theHttpSecuritySource
.
-
getSpecification
public ManagedObjectSourceSpecification getSpecification()
Description copied from interface:ManagedObjectSource
Obtains 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:
getSpecification
in 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:ManagedObjectSource
Initialises theManagedObjectSource
.- Specified by:
init
in interfaceManagedObjectSource<O extends java.lang.Enum<O>,Indexed>
- Parameters:
context
-ManagedObjectSourceContext
to use in initialising.- Returns:
- Meta-data to describe this.
- Throws:
java.lang.Exception
- Should theManagedObjectSource
fail to configure itself from the input properties.
-
start
public void start(ManagedObjectExecuteContext<Indexed> context) throws java.lang.Exception
Description copied from interface:ManagedObjectSource
Called once after
ManagedObjectSource.init(ManagedObjectSourceContext)
to indicate thisManagedObjectSource
should start execution.On invocation of this method,
ProcessState
instances may be invoked via theManagedObjectExecuteContext
.- Specified by:
start
in interfaceManagedObjectSource<O extends java.lang.Enum<O>,Indexed>
- Parameters:
context
-ManagedObjectExecuteContext
to use in starting thisManagedObjectSource
.- Throws:
java.lang.Exception
- Should theManagedObjectSource
fail to start execution.
-
sourceManagedObject
public void sourceManagedObject(ManagedObjectUser user)
Description copied from interface:ManagedObjectSource
Sources aManagedObject
from thisManagedObjectSource
.- Specified by:
sourceManagedObject
in interfaceManagedObjectSource<O extends java.lang.Enum<O>,Indexed>
- Parameters:
user
-ManagedObjectUser
interested in using theManagedObject
.
-
stop
public void stop()
Description copied from interface:ManagedObjectSource
Called to notify that the
OfficeFloor
is being closed.On return from this method, no further
ProcessState
instances may be invoked.- Specified by:
stop
in interfaceManagedObjectSource<O extends java.lang.Enum<O>,Indexed>
-
-