|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.view.PolicyViewConfiguration
public class PolicyViewConfiguration
Component factory that provides extended functionality for the policy view.
Constructor Summary | |
---|---|
PolicyViewConfiguration(Configuration configuration,
PolicyHolder holder)
Creates policy view component factory. |
Method Summary | ||
---|---|---|
void |
addFactoryAdapter(org.picocontainer.ComponentAdapter<?> componentAdapter)
Adds a component adapter to the factory container. |
|
void |
addFactoryComponent(Object implOrInstance)
Adds a component implementation or instance to the factory container. |
|
void |
addFactoryComponent(Object componentKey,
Object implOrInstance)
Adds a component implementation or instance to the factory container with a key. |
|
boolean |
canCreate(TypeKey typeKey)
Check if this factory can create components of the given type. |
|
boolean |
canCreatePolicyComponent(Class<?> scope,
Class<?> type)
Check if a component that depends on the currently loaded policy can be created. |
|
protected Configuration |
configure(Configuration config,
PolicyHolder holder)
Configures the specified component factory for use with the policy view. |
|
|
create(Class<?> type,
State... context)
Creates a component. |
|
|
create(TypeKey typeKey,
State... context)
Creates a typed component. |
|
ApplicationView |
createApplicationView()
Returns a new instance of the application view configured. |
|
protected
|
createOrderedList(Class<T> implClass,
String section)
Creates an ordered list for the specified implementation class. |
|
org.openpermis.policy.bean.PartBeanFactory |
createPartBeanFactory()
Creates a part bean factory for this configuration. |
|
|
createPolicyComponent(Class<T> type)
Creates a component that depends on the currently loaded policy. |
|
|
createPolicyComponent(Class<T> scope,
Class<?> type,
Object parameter)
Creates a component that depends on the currently loaded policy. |
|
List<Tool> |
createStartupTools(List<Tool> toolList)
Determines the list of tools to open at startup. |
|
String |
getLocation(Tool tool)
Returns the preferred location specification for a tool. |
|
List<Class<?>> |
getOrder(String section)
Returns the order in which implementation classes of the specified section have been listed. |
|
List<Plugin> |
getPlugins()
Returns an ordered list of all known plugins. |
|
List<PolicyPlugin> |
getPolicyPlugins()
Returns an ordered list of all known policy plugins. |
|
PolicySerializer |
getPolicySerializer()
Returns the policy serializer of this configuration. |
|
protected PolicyPresenter |
getPresenter()
Returns the currently active policy presenter. |
|
Object |
getSetting(Object type,
String key)
Returns the setting value for the specified type and key. |
|
List<Tool> |
getStartupTools()
Returns the list of tools to open at startup. |
|
List<Tool> |
getTools()
Returns an ordered list of all known tools. |
|
|
instances(Class<T> type)
Returns a list of all instances of a specific type stored at the factory. |
|
void |
setPresenter(PolicyPresenter presenter)
Sets the currently active policy presenter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolicyViewConfiguration(Configuration configuration, PolicyHolder holder)
configuration
- the configuration to delegate to.holder
- the holder of the active policy.Method Detail |
---|
protected Configuration configure(Configuration config, PolicyHolder holder)
View specific classes needed for injection will be added here.
config
- the actual configuration to delegate to.holder
- the holder of the active policy.
protected <T> List<T> createOrderedList(Class<T> implClass, String section)
public List<Tool> createStartupTools(List<Tool> toolList)
toolList
- the list of tools to consider.
public void setPresenter(PolicyPresenter presenter)
presenter
- the presenter to mark as currently active,
null
if there is no active presenter.protected PolicyPresenter getPresenter()
public <T> T createPolicyComponent(Class<T> scope, Class<?> type, Object parameter)
T
- the type of component to create.scope
- the sort of component to create, e.g. Editor.class.type
- the type of component to create, e.g. TargetBean.class.parameter
- an additional parameter to pass to the constructor.
public <T> T createPolicyComponent(Class<T> type)
The currently active policy is injected as PolicyBean
.
T
- the type of component to create.type
- the type of component to create.
public boolean canCreatePolicyComponent(Class<?> scope, Class<?> type)
scope
- the sort of component to create, e.g. Editor.class.type
- the type of component to create, e.g. TargetBean.class.
true
if an implementation is available, false
otherwise.public List<Tool> getTools()
null
.public List<Tool> getStartupTools()
null
if there is none.public List<Plugin> getPlugins()
null
.public List<PolicyPlugin> getPolicyPlugins()
null
.public String getLocation(Tool tool)
tool
- the tool for which to determine the location.
null
if unknown.public org.openpermis.policy.bean.PartBeanFactory createPartBeanFactory()
public PolicySerializer getPolicySerializer()
public void addFactoryAdapter(org.picocontainer.ComponentAdapter<?> componentAdapter)
Configuration
addFactoryAdapter
in interface Configuration
componentAdapter
- the component adapter to add.public void addFactoryComponent(Object componentKey, Object implOrInstance)
Configuration
Implementation classes will be added without caching.
addFactoryComponent
in interface Configuration
componentKey
- the component key to use.implOrInstance
- the component implementation or instance add.public void addFactoryComponent(Object implOrInstance)
Configuration
Implementation classes will be added without caching.
addFactoryComponent
in interface Configuration
implOrInstance
- the component implementation or instance add.public List<Class<?>> getOrder(String section)
Configuration
getOrder
in interface Configuration
section
- the section as it appears in the configuration file.
null
for inexistent sections.public Object getSetting(Object type, String key)
Configuration
getSetting
in interface Configuration
type
- the class for which to retrieve the value of key.key
- the key for which to retrieve the value.
null
if undefined.public boolean canCreate(TypeKey typeKey)
ComponentFactory
canCreate
in interface ComponentFactory
typeKey
- the type key for which to check if the factory can create an instance.
true
if the factory can provide an instance, false
otherwise.public <T> T create(Class<?> type, State... context)
ComponentFactory
The context state supplied is used to fill in missing parameters that are not available as default instances or implementations at the factory.
create
in interface ComponentFactory
T
- the component type, has to correspond to the scope of the type key.type
- the class for which to create the component.context
- additional state to inject to the component created.
public <T> T create(TypeKey typeKey, State... context)
ComponentFactory
The context state supplied is used to fill in missing parameters that are not available as default instances or implementations at the factory.
create
in interface ComponentFactory
T
- the component type, has to correspond to the scope of the type key.typeKey
- the type key for which to create the component.context
- additional state to inject to the component created.
public ApplicationView createApplicationView()
Configuration
createApplicationView
in interface Configuration
public <T> List<T> instances(Class<T> type)
ComponentFactory
Take care to use this method only to retrieve cached instances otherwise this factory will create an instance for each of the registered implementation types that are assignable to the type specified.
instances
in interface ComponentFactory
T
- the instance type to retrieve.type
- the class of the instance type to retrieve.
null
but may be empty.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG