Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.policymanager
Class PolicyManagerFactory

java.lang.Object
  extended by oracle.wsm.policymanager.PolicyManagerFactory


public class PolicyManagerFactory
extends Object

Factory class suitable for obtaining access to Policy Manager objects.

In order to obtain a Policy Manager object, a number of different configuration options must be specified depending on how the objects will be accessed. These can be provided explicitly via the create methods' arguments or will be retrieved automatically from the PAP configuration file (J2EE_HOME/config/policy-accessor-config.xml). For WLS it is checked under DOMAIN_PATH/config. If the value is not available, then a suitable default will be calculated based on the current environment (e.g. system properties). The set of properties and the order of precedence for calculating each option is as follows:

Since:
release specific (what release of product did this appear in)
Version:
$Header: owsm/src/oracle/wsm/policymanager/PolicyManagerFactory.java /st_j2ee_11.1.1.1.0/1 2009/04/29 19:32:27 rmulye Exp $
Author:
pyamuna

Nested Class Summary
static class PolicyManagerFactory.PM_MODE_ENUM
           

 

Field Summary
static String ACTIVE_PROTOCOL
           
static String APPLICATION_NAME
           
static String CSFKEY_PROPERTY
           
static String LOOKUP_HOST
           
static String LOOKUP_PORT
           
static String LOOKUPMODE_MANAGED
           
static String MDS_MODULE_HOME
           
static String OWSM_CSF_MAPPING_ALIAS
           
static String POLICY_ACCESSOR_CONFIG_LOC
           
static String POLICY_ACCESSOR_ELEM
           
static String PROP_NAME_ATTR
           
static String PROPERTIES_ELEM
           
static String PROPERTY_ELEM
           

 

Constructor Summary
PolicyManagerFactory()
           

 

Method Summary
static Map<String,String> addCredsUsingCSF(Map<String,String> config)
          This method adds the credentials to the config using the csf-key if it exists
static IPolicyAccessService createPolicyAccessService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props)
           
static IPolicyAccessService createPolicyAccessService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props, Subject subject)
          A method to create policy access service objects.
static IPolicyService createPolicyService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props)
           
static IPolicyService createPolicyService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props, Subject subject)
          A method to create Policy service objects.
static IQueryService createQueryService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props)
          A method to create query service objects.
static IQueryService createQueryService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props, Subject subject)
           
static IUpdateService createUpdateService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props)
           
static IUpdateService createUpdateService(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> props, Subject subject)
          A method to create update service objects.
static IAppServerConfig getAppServerConfig(Map<String,String> pmConfig)
          This method returns the appropriate configuration object.
static Map<String,String> getPAPConfig()
           
static Map<String,String> joinPolicyAccessorConfig(Map<String,String> inProps)
          Parse policy-accessor-config.xml file and join (i.e.
static void populateProtocol(PolicyManagerFactory.PM_MODE_ENUM mode, Map<String,String> pmConfig)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

MDS_MODULE_HOME

public static final String MDS_MODULE_HOME
See Also:
Constant Field Values

APPLICATION_NAME

public static final String APPLICATION_NAME
See Also:
Constant Field Values

LOOKUPMODE_MANAGED

public static final String LOOKUPMODE_MANAGED
See Also:
Constant Field Values

ACTIVE_PROTOCOL

public static final String ACTIVE_PROTOCOL
See Also:
Constant Field Values

POLICY_ACCESSOR_CONFIG_LOC

public static final String POLICY_ACCESSOR_CONFIG_LOC
See Also:
Constant Field Values

POLICY_ACCESSOR_ELEM

public static final String POLICY_ACCESSOR_ELEM
See Also:
Constant Field Values

PROPERTIES_ELEM

public static final String PROPERTIES_ELEM
See Also:
Constant Field Values

PROPERTY_ELEM

public static final String PROPERTY_ELEM
See Also:
Constant Field Values

PROP_NAME_ATTR

public static final String PROP_NAME_ATTR
See Also:
Constant Field Values

LOOKUP_HOST

public static final String LOOKUP_HOST
See Also:
Constant Field Values

LOOKUP_PORT

public static final String LOOKUP_PORT
See Also:
Constant Field Values

CSFKEY_PROPERTY

public static final String CSFKEY_PROPERTY
See Also:
Constant Field Values

OWSM_CSF_MAPPING_ALIAS

public static final String OWSM_CSF_MAPPING_ALIAS
See Also:
Constant Field Values

Constructor Detail

PolicyManagerFactory

public PolicyManagerFactory()

Method Detail

createQueryService

public static IQueryService createQueryService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                               Map<String,String> props)
                                        throws PolicyManagerException
A method to create query service objects.

This factory hides the complexity of the either using the local mode or remote mode when using the IQueryService to query the Policy Store.

The query service objects are cached. For local mode the caching is based the location of the policy store specified by the mds.module.home property. In remote mode, the caching is based on the jndi url to look up the query service.

This factory provides enables the Policy Manager to work either as a shared library or as a J2EE Application.

Parameters:
mode - access mode
props - configuration properties
Returns:
interface for query service
Throws:
PolicyManagerException

createQueryService

public static IQueryService createQueryService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                               Map<String,String> props,
                                               Subject subject)
                                        throws PolicyManagerException
Throws:
PolicyManagerException

createUpdateService

public static IUpdateService createUpdateService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                                 Map<String,String> props)
                                          throws PolicyManagerException
Throws:
PolicyManagerException

createUpdateService

public static IUpdateService createUpdateService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                                 Map<String,String> props,
                                                 Subject subject)
                                          throws PolicyManagerException
A method to create update service objects.

This factory hides the complexity of the either using the local mode or remote mode when using the IUpdateService to update the Policy Store.

The update service objects are cached. For local mode the caching is based the location of the policy store specified by the mds.module.home property. In remote mode, the caching is based on the jndi url to look up the update service.

This factory provides enables the Policy Manager to work either as a shared library or as a J2EE Application.

Parameters:
mode - access mode
props - configuration properties
Returns:
interface for update service
Throws:
PolicyManagerException

createPolicyAccessService

public static IPolicyAccessService createPolicyAccessService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                                             Map<String,String> props)
                                                      throws PolicyManagerException
Throws:
PolicyManagerException

createPolicyAccessService

public static IPolicyAccessService createPolicyAccessService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                                             Map<String,String> props,
                                                             Subject subject)
                                                      throws PolicyManagerException
A method to create policy access service objects.

This factory hides the complexity of the either using the local mode or remote mode when using the IPolicyAccessService to update the Policy Store.

The policy access service objects are cached. For local mode the caching is based the location of the policy store specified by the mds.module.home property. In remote mode, the caching is based on the jndi url to look up the policy access service.

This factory provides enables the Policy Manager to work either as a shared library or as a J2EE Application.

Parameters:
mode - access mode
props - configuration properties
Returns:
interface for policy access service
Throws:
PolicyManagerException

createPolicyService

public static IPolicyService createPolicyService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                                 Map<String,String> props)
                                          throws PolicyManagerException
Throws:
PolicyManagerException

createPolicyService

public static IPolicyService createPolicyService(PolicyManagerFactory.PM_MODE_ENUM mode,
                                                 Map<String,String> props,
                                                 Subject subject)
                                          throws PolicyManagerException
A method to create Policy service objects. This factory hides the complexity of the either using the local mode or remote mode when using the IPolicyService to use some of the policy specific the Policy Store. The Policy service objects are cached. For local mode the caching is based the location of the policy store specified by the mds.module.home property. In remote mode, the caching is based on the jndi url to look up the Policy service. This factory provides enables the Policy Manager to work either as a shared library or as a J2EE Application.
Parameters:
mode -
props -
Returns:
Throws:
PolicyManagerException

populateProtocol

public static void populateProtocol(PolicyManagerFactory.PM_MODE_ENUM mode,
                                    Map<String,String> pmConfig)
                             throws PolicyManagerException
Throws:
PolicyManagerException

joinPolicyAccessorConfig

public static Map<String,String> joinPolicyAccessorConfig(Map<String,String> inProps)
Parse policy-accessor-config.xml file and join (i.e. add if not already present) PAP properties to existing properties, returning new map.
Parameters:
inProps - initial property map
Returns:
new property map containing join of initial and PAP properties

getPAPConfig

public static Map<String,String> getPAPConfig()

addCredsUsingCSF

public static Map<String,String> addCredsUsingCSF(Map<String,String> config)
                                           throws PolicyManagerException
This method adds the credentials to the config using the csf-key if it exists
Throws:
PolicyManagerException

getAppServerConfig

public static IAppServerConfig getAppServerConfig(Map<String,String> pmConfig)
This method returns the appropriate configuration object. This method first checks the provider url if the provider url protocol is ormi returns oc4j config. For t3 and iiop protocol the WLSConfig object is returned. If there is no provider url set then it looks for system properites
Parameters:
pmConfig -
Returns:

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved.