Skip navigation links

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

E10689-01


oracle.wsm.policymanager
Class PolicyManagerUtil

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


public class PolicyManagerUtil
extends Object
Since:
OWSM 11gR1
Version:
$Header: owsm/src/oracle/wsm/policymanager/PolicyManagerUtil.java st_j2ee_vkdwived_bug-7505220/2 2008/10/29 01:57:03 vkdwived Exp $
Author:
jbryan

Field Summary
static String ACTIVE_PROTOCOL
          Name of property for determining access protocol.
static String ASSERTION_TEMPLATE_TYPE
           
static String CLASSPATH_PROTOCOL_NAME
          Classpath access protocol (reads from classpath)
static String FILE_PROTOCOL_NAME
          File access protocol (directly accesses file-system)
static String LOCAL_PROTOCOL_NAME
          Local access protocol (uses file-based MDS repository)
static String POLICY_TYPE
           
static String PROP_ASSERTION_HOME_FILE
          Name of the property that contains the location of the assertion template repository.
static String PROP_ATTACHMENT_HOME_FILE
          Name of the property that contains the location of the policy attachment repository.
static String PROP_CURRENT_DIR
          Name of current directory.
static String PROP_DEFAULT_CLASSPATH_ROOTS
          Name of default classpath policy roots path.
static String PROP_INSTANCE_HOME
          Name of system property that contains the location of this J2EE instance.
static String PROP_MODULE_HOME_FILE
          Alternate (preferred) name of the property that contains the location of the policy repository.
static String PROP_MODULE_HOME_MDS
          Name of the property that contains the location of the file-based MDS repository.
static String PROP_PATH_SEPARATOR
          Character used to separate paths.
static String PROP_POLICY_HOME_FILE
          Name for the property that contains the location of the policy repository.
static String PROP_USER_HOME
          Name of system property that contains the location of the user's home directory.
static String REMOTE_PROTOCOL_NAME
          Remote access protocol (connects to Policy Manager EJBs)

 

Constructor Summary
PolicyManagerUtil()
           

 

Method Summary
static String getAccessProtocol(Map<String,String> properties)
          Get policy access protocol.
static String getAssertionHome(Map<String,String> properties)
          Get file assertion template repository home.
static IAssertionTemplate getAssertionTemplateFromArtifact(MDSArtifact mdsArtifact)
          Generate an assertion template using information from a MDSArtifact
static String getAttachmentHome(Map<String,String> properties)
          Get file attachment repository home.
static String getClasspathRoots(Map<String,String> properties)
          Get classpath policy repository home path.
static String getFQName(String name, String prefix)
          Normalizes the passed name and appends the prefix supplied to make a fully qualified MDS name
static String getMdsHome(Map<String,String> properties)
          Get file-based MDS repository home.
static IPolicy getPolFromArtifact(MDSArtifact mdsArtifact)
          Generate a policy object using information from a MDSArtifact
static String getPolicyHome(Map<String,String> properties)
          Get file policy repository home.
static boolean validatePolicy(IPolicy policy)
          This method will validate the policy and return 'true' for valid policy and 'false' for Invalid policy.

 

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

 

Field Detail

ACTIVE_PROTOCOL

public static final String ACTIVE_PROTOCOL
Name of property for determining access protocol.
See Also:
Constant Field Values

CLASSPATH_PROTOCOL_NAME

public static final String CLASSPATH_PROTOCOL_NAME
Classpath access protocol (reads from classpath)
See Also:
Constant Field Values

FILE_PROTOCOL_NAME

public static final String FILE_PROTOCOL_NAME
File access protocol (directly accesses file-system)
See Also:
Constant Field Values

LOCAL_PROTOCOL_NAME

public static final String LOCAL_PROTOCOL_NAME
Local access protocol (uses file-based MDS repository)

REMOTE_PROTOCOL_NAME

public static final String REMOTE_PROTOCOL_NAME
Remote access protocol (connects to Policy Manager EJBs)

PROP_MODULE_HOME_MDS

public static final String PROP_MODULE_HOME_MDS
Name of the property that contains the location of the file-based MDS repository.
See Also:
Constant Field Values

PROP_ASSERTION_HOME_FILE

public static final String PROP_ASSERTION_HOME_FILE
Name of the property that contains the location of the assertion template repository.
See Also:
Constant Field Values

PROP_ATTACHMENT_HOME_FILE

public static final String PROP_ATTACHMENT_HOME_FILE
Name of the property that contains the location of the policy attachment repository.
See Also:
Constant Field Values

PROP_POLICY_HOME_FILE

public static final String PROP_POLICY_HOME_FILE
Name for the property that contains the location of the policy repository.
See Also:
Constant Field Values

PROP_MODULE_HOME_FILE

public static final String PROP_MODULE_HOME_FILE
Alternate (preferred) name of the property that contains the location of the policy repository.
See Also:
Constant Field Values

PROP_INSTANCE_HOME

public static final String PROP_INSTANCE_HOME
Name of system property that contains the location of this J2EE instance.
See Also:
Constant Field Values

PROP_USER_HOME

public static final String PROP_USER_HOME
Name of system property that contains the location of the user's home directory.
See Also:
Constant Field Values

PROP_PATH_SEPARATOR

public static final String PROP_PATH_SEPARATOR
Character used to separate paths.
See Also:
Constant Field Values

PROP_DEFAULT_CLASSPATH_ROOTS

public static final String PROP_DEFAULT_CLASSPATH_ROOTS
Name of default classpath policy roots path.
See Also:
Constant Field Values

PROP_CURRENT_DIR

public static final String PROP_CURRENT_DIR
Name of current directory.
See Also:
Constant Field Values

ASSERTION_TEMPLATE_TYPE

public static final String ASSERTION_TEMPLATE_TYPE
See Also:
Constant Field Values

POLICY_TYPE

public static final String POLICY_TYPE
See Also:
Constant Field Values

Constructor Detail

PolicyManagerUtil

public PolicyManagerUtil()

Method Detail

getAccessProtocol

public static String getAccessProtocol(Map<String,String> properties)
Get policy access protocol.

The value will be obtained either from the supplied property map or a system property, or a suitable default will be calculated, if neither is available. The order of precedence is as follows:

  1. Map property active.protocol
  2. System property active.protocol
  3. "remote" if running in managed environment, "local" otherwise
Parameters:
properties - Primary configuration from which to retrieve protocol (must not be null)
Returns:
policy access protocol

getMdsHome

public static String getMdsHome(Map<String,String> properties)
Get file-based MDS repository home.

The home will be obtained either from the supplied property map or a system property, or a suitable default will be calculated, if neither is available. The order of precedence is as follows:

  1. Map property mds.module.home
  2. System property mds.module.home
  3. System property oracle.j2ee.home + "/gmds"
  4. System property user.dir
  5. "."
Parameters:
properties - map of properties to check
Returns:
repository home

getAssertionHome

public static String getAssertionHome(Map<String,String> properties)
Get file assertion template repository home.

The home will be obtained either from the supplied property map or a system property, or a suitable default will be calculated, if neither is available. The order of precedence is as follows:

  1. Map property file.assertion.home
  2. Map property mds.module.home + "/owsm/assertiontemplates"
  3. System property file.assertion.home
  4. System property mds.module.home + "/owsm/assertiontemplates"
  5. System property oracle.j2ee.home + "/gmds/owsm/assertiontemplates"
  6. System property user.dir
  7. "."
Parameters:
properties - map of properties to check
Returns:
repository home

getAttachmentHome

public static String getAttachmentHome(Map<String,String> properties)
Get file attachment repository home.

The home will be obtained either from the supplied property map or a system property, or a suitable default will be calculated, if neither is available. The order of precedence is as follows:

  1. Map property file.attachment.home
  2. Map property mds.module.home + "/owsm/policyAttachments"
  3. System property file.attachment.home
  4. System property mds.module.home + "/owsm/policyAttachments"
  5. System property oracle.j2ee.home + "/gmds/owsm/policyAttachments"
  6. System property user.dir
  7. "."
Parameters:
properties - map of properties to check
Returns:
repository home

getClasspathRoots

public static String getClasspathRoots(Map<String,String> properties)
Get classpath policy repository home path.

The home will be obtained either from the supplied property map or a system property, or a suitable default will be calculated, if neither is available. The order of precedence is as follows:

  1. Map property file.module.home
  2. System property file.module.home
  3. "/META-INF/policies:/"
Parameters:
properties - map of properties to check
Returns:
repository home

getPolicyHome

public static String getPolicyHome(Map<String,String> properties)
Get file policy repository home.

The home will be obtained either from the supplied property map or a system property, or a suitable default will be calculated, if neither is available. The order of precedence is as follows:

  1. Map property file.policy.home
  2. Map property file.module.home
  3. Map property mds.module.home + "/owsm/policies"
  4. System property file.policy.home
  5. System property file.module.home
  6. System property mds.module.home + "/owsm/policies"
  7. System property oracle.j2ee.home + "/gmds/owsm/policies"
  8. System property user.dir
  9. "."
Parameters:
properties - map of properties to check
Returns:
repository home

getFQName

public static String getFQName(String name,
                               String prefix)
Normalizes the passed name and appends the prefix supplied to make a fully qualified MDS name
Parameters:
name -
prefix -
Returns:

validatePolicy

public static boolean validatePolicy(IPolicy policy)
This method will validate the policy and return 'true' for valid policy and 'false' for Invalid policy.
Parameters:
policy -
Returns:
boolean ('true') If policy is valid, ('false') If policy is invalid.

getPolFromArtifact

public static IPolicy getPolFromArtifact(MDSArtifact mdsArtifact)
                                  throws PolicyManagerException
Generate a policy object using information from a MDSArtifact
Parameters:
mdsArtifact -
Returns:
Throws:
PolicyManagerException

getAssertionTemplateFromArtifact

public static IAssertionTemplate getAssertionTemplateFromArtifact(MDSArtifact mdsArtifact)
                                                           throws PolicyManagerException
Generate an assertion template using information from a MDSArtifact
Parameters:
mdsArtifact -
Returns:
Throws:
PolicyManagerException

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.