Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.jdevimpl.audit.core
Class DefaultProfile

java.lang.Object
  extended by oracle.jdeveloper.audit.service.Profile
      extended by oracle.jdevimpl.audit.core.DefaultProfile


public class DefaultProfile
extends Profile

Field Summary
static java.lang.String FORMAT_VERSION
          The current version of the Audit profile file format.

 

Constructor Summary
DefaultProfile(Profile profile)
           
DefaultProfile(ProfileDefinition definition, Profile profile)
           
DefaultProfile(ProfileDefinition definition, java.lang.String name, java.net.URL url)
          Creates a new predefined profile with all registered bean definitions configured from a specified file.
DefaultProfile(ProfileDefinition definition, java.lang.String name, java.net.URL url, BeanDefinition[] definitions)
           
DefaultProfile(java.lang.String name)
          Creates a new Profile with all registered bean beans included and enabled.
DefaultProfile(java.lang.String name, BeanDefinition[] beans)
          Creates a new Profile with the beans with specified definitions included and enabled.
DefaultProfile(java.lang.String name, java.lang.String[] ids)
          Creates a new Profile with all registered bean beans included and the beans with specified ids enabled.
DefaultProfile(java.lang.String name, java.net.URL url)
          Creates a new profile with all registered analyzers configured from a profile file.
DefaultProfile(java.net.URL url)
           

 

Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Adds a change listener to be notified when changes are applied to this profile.
 void applyChanges(ProfileTransaction transaction)
          Apply the changes in a transaction to this profile.
 ExtensionBean createBean(BeanDefinition definition, boolean force, java.util.Map<java.lang.String,ExtensionBean> context)
          Creates an instance of a bean in this profile.
 java.util.Map<java.lang.String,ExtensionBean> createBeans(boolean force)
          Creates instances of all beans in this profile.
 ProfileTransaction createTransaction()
          Creates a transaction for this profile.
 boolean equals(java.lang.Object object)
           
 ValueHandle getChangedValue(java.lang.String id, java.lang.String propertyName)
          Gets the value of a property of a bean of this profile changed from its default value, null if not changed.
 MultiMap<java.lang.String,ValueHandle> getChangedValues()
          Gets the properties of beans of this profile changed from their default values.
 java.lang.Object getDefaultValue(BeanDefinition definition, java.lang.String propertyName)
          Gets the default value of a property of a bean of this profile.
 ProfileDefinition getDefinition()
          Gets the definition of this profile, or null if not a predefined profile.
 BeanDefinition getDefinition(java.lang.String id)
          Gets the definition of a specified bean in this profile, or null if none.
 java.util.Collection<BeanDefinition> getDefinitions()
          Gets the definitions of all beans in this profile.
 java.lang.String getId()
          Gets the id of this profile, or null if not a predefined profile.
 java.lang.String getName()
          Gets the name of this profile.
 java.net.URL getURL()
          Gets the URL from which to load properties of this profile, or null if this profile is not associated with a file.
 int hashCode()
           
 boolean isEnabled(java.lang.String id)
          Gets whether a bean in this profile is enabled.
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Adds a change listener to be notified when changes are applied to this profile.
 void save(java.net.URL url)
          Saves this profile.
 java.lang.String toString()
           

 

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

 

Field Detail

FORMAT_VERSION

public static final java.lang.String FORMAT_VERSION
The current version of the Audit profile file format. Versions before 11.1.2 use XMLEncoder/XMLDecoder. 9.0.5 did not include a foramt identifier (version).
10.1.3 Boolean identifying profile as predefined replaced by a String key identifying predefined profile. Format identifier added.
10.1.3-1 Added support for dynamic property setters.
11.1.1 Disassociated setters from analyzers.
11.1.1-1 Added qualifying prefix to bean names.
11.1.2 New file format.
See Also:
Constant Field Values

Constructor Detail

DefaultProfile

public DefaultProfile(java.net.URL url)
               throws java.io.IOException
Throws:
java.io.IOException

DefaultProfile

public DefaultProfile(java.lang.String name,
                      java.net.URL url)
               throws java.io.IOException
Creates a new profile with all registered analyzers configured from a profile file.
Parameters:
name - The name of the profile.
url - The url of a profile file.
Throws:
java.io.IOException

DefaultProfile

public DefaultProfile(ProfileDefinition definition,
                      java.lang.String name,
                      java.net.URL url)
               throws java.io.IOException
Creates a new predefined profile with all registered bean definitions configured from a specified file.
Parameters:
definition - The definition of this profile.
name - The name of the profile.
url - The url of a profile file.
Throws:
java.io.IOException

DefaultProfile

public DefaultProfile(java.lang.String name)
Creates a new Profile with all registered bean beans included and enabled.
Parameters:
name - The name of the profile.

DefaultProfile

public DefaultProfile(java.lang.String name,
                      java.lang.String[] ids)
Creates a new Profile with all registered bean beans included and the beans with specified ids enabled. If no ids are specified, none are enabled.
Parameters:
name - The name of the profile.
ids - The bean definitions to enable for the profile.

DefaultProfile

public DefaultProfile(java.lang.String name,
                      BeanDefinition[] beans)
Creates a new Profile with the beans with specified definitions included and enabled. If no bean definitions are specified, then all registered beans are included and enabled.
Parameters:
name - The name of the profile.
beans - The bean definitions for the profile.

DefaultProfile

public DefaultProfile(Profile profile)

DefaultProfile

public DefaultProfile(ProfileDefinition definition,
                      Profile profile)

DefaultProfile

public DefaultProfile(ProfileDefinition definition,
                      java.lang.String name,
                      java.net.URL url,
                      BeanDefinition[] definitions)
               throws java.io.IOException
Throws:
java.io.IOException

Method Detail

getDefinition

public ProfileDefinition getDefinition()
Description copied from class: Profile
Gets the definition of this profile, or null if not a predefined profile.
Specified by:
getDefinition in class Profile

getId

public java.lang.String getId()
Description copied from class: Profile
Gets the id of this profile, or null if not a predefined profile.
Specified by:
getId in class Profile

getName

public java.lang.String getName()
Description copied from class: Profile
Gets the name of this profile.
Specified by:
getName in class Profile

getURL

public java.net.URL getURL()
Description copied from class: Profile
Gets the URL from which to load properties of this profile, or null if this profile is not associated with a file.
Specified by:
getURL in class Profile

getDefinitions

public java.util.Collection<BeanDefinition> getDefinitions()
Description copied from class: Profile
Gets the definitions of all beans in this profile.
Specified by:
getDefinitions in class Profile

getDefinition

public BeanDefinition getDefinition(java.lang.String id)
Description copied from class: Profile
Gets the definition of a specified bean in this profile, or null if none.
Specified by:
getDefinition in class Profile
Parameters:
id - the id of the bean.

createBeans

public java.util.Map<java.lang.String,ExtensionBean> createBeans(boolean force)
Description copied from class: Profile
Creates instances of all beans in this profile.

When force is true, loading classes is first tried with the Audit class loader before an unloaded extension is loaded.

Specified by:
createBeans in class Profile
Parameters:
force - Whether to load the extension defining this bean if needed.

createBean

public ExtensionBean createBean(BeanDefinition definition,
                                boolean force,
                                java.util.Map<java.lang.String,ExtensionBean> context)
Description copied from class: Profile
Creates an instance of a bean in this profile.

When force is true, loading classes is first tried with the Audit class loader before an unloaded extension is loaded.

The created bean is added to the context map, referenced beans are taken from the context map if present, otherwise they are created and added to the context map.

Specified by:
createBean in class Profile
Parameters:
definition - The definition of the bean to load.
force - Whether to load the extension defining this bean if needed.
context - Context map for the created bean.

getDefaultValue

public java.lang.Object getDefaultValue(BeanDefinition definition,
                                        java.lang.String propertyName)
                                 throws java.beans.IntrospectionException,
                                        java.lang.reflect.InvocationTargetException,
                                        java.lang.IllegalAccessException
Description copied from class: Profile
Gets the default value of a property of a bean of this profile.
Specified by:
getDefaultValue in class Profile
Parameters:
definition - The definition of the bean.
propertyName - The name of the property.
Returns:
The default value of the property.
Throws:
java.beans.IntrospectionException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException

isEnabled

public boolean isEnabled(java.lang.String id)
Description copied from class: Profile
Gets whether a bean in this profile is enabled. The extension defining the bean need not be loaded and will not be loaded by this method.
Specified by:
isEnabled in class Profile
Parameters:
id - the id of the bean.

getChangedValues

public MultiMap<java.lang.String,ValueHandle> getChangedValues()
Description copied from class: Profile
Gets the properties of beans of this profile changed from their default values.
Specified by:
getChangedValues in class Profile

getChangedValue

public ValueHandle getChangedValue(java.lang.String id,
                                   java.lang.String propertyName)
Description copied from class: Profile
Gets the value of a property of a bean of this profile changed from its default value, null if not changed.
Specified by:
getChangedValue in class Profile
Parameters:
id - the id of the bean.
propertyName - the name of the property.

createTransaction

public ProfileTransaction createTransaction()
Description copied from class: Profile
Creates a transaction for this profile.
Specified by:
createTransaction in class Profile

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)
Description copied from class: Profile
Adds a change listener to be notified when changes are applied to this profile.
Specified by:
addChangeListener in class Profile

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)
Description copied from class: Profile
Adds a change listener to be notified when changes are applied to this profile.
Specified by:
removeChangeListener in class Profile

applyChanges

public void applyChanges(ProfileTransaction transaction)
Description copied from class: Profile
Apply the changes in a transaction to this profile. For beans defined by unloaded extensions, only the enabled property can be changed.
Specified by:
applyChanges in class Profile

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

save

public void save(java.net.URL url)
          throws java.io.IOException
Description copied from class: Profile
Saves this profile.
Specified by:
save in class Profile
Throws:
java.io.IOException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.