org.argouml.profile.internal
Class ProfileManagerImpl

java.lang.Object
  extended by org.argouml.profile.internal.ProfileManagerImpl
All Implemented Interfaces:
ProfileManager

public class ProfileManagerImpl
extends java.lang.Object
implements ProfileManager

Default ProfileManager implementation


Field Summary
static ConfigurationKey KEY_DEFAULT_DIRECTORIES
          The configuration key for the search directories.
static ConfigurationKey KEY_DEFAULT_PROFILES
          The configuration key for the default profiles.
 
Constructor Summary
ProfileManagerImpl()
          Constructor - includes initialization of built-in default profiles.
 
Method Summary
 void addSearchPathDirectory(java.lang.String path)
          Add a new directory to the directory list.
 void addToDefaultProfiles(Profile p)
          Add a profile to the default list.
 void applyConfiguration(ProfileConfiguration pc)
          Apply the given ProfileConfiguration to ArgoUML
 java.util.List<Profile> getDefaultProfiles()
           
 Profile getProfileForClass(java.lang.String profileClass)
          Search for a Profile with the given Java classname.
 java.util.List<Profile> getRegisteredProfiles()
           
 java.util.List<java.lang.String> getSearchPathDirectories()
           
 Profile getUMLProfile()
           
 Profile lookForRegisteredProfile(java.lang.String value)
          Looks for registered Profile
 void refreshRegisteredProfiles()
          Look for XMI files at the current directory list and registers them as user defined profiles.
 void registerProfile(Profile p)
          Register a new profile.
 void removeFromDefaultProfiles(Profile p)
          Remove a profile from the default list.
 void removeProfile(Profile p)
          Remove a profile from the list of registered profiles.
 void removeSearchPathDirectory(java.lang.String path)
          Remove a directory from the directory list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_DEFAULT_PROFILES

public static final ConfigurationKey KEY_DEFAULT_PROFILES
The configuration key for the default profiles.


KEY_DEFAULT_DIRECTORIES

public static final ConfigurationKey KEY_DEFAULT_DIRECTORIES
The configuration key for the search directories.

Constructor Detail

ProfileManagerImpl

public ProfileManagerImpl()
Constructor - includes initialization of built-in default profiles.

Method Detail

getRegisteredProfiles

public java.util.List<Profile> getRegisteredProfiles()
Specified by:
getRegisteredProfiles in interface ProfileManager
Returns:
the list of registered profiles

registerProfile

public void registerProfile(Profile p)
Description copied from interface: ProfileManager
Register a new profile.

Specified by:
registerProfile in interface ProfileManager
Parameters:
p - A profile to be registered so that it is available to the users.

removeProfile

public void removeProfile(Profile p)
Description copied from interface: ProfileManager
Remove a profile from the list of registered profiles. Only User defined profiles can be removed.

Specified by:
removeProfile in interface ProfileManager
Parameters:
p - the profile to unregister. It will no longer be available for selection by users

getProfileForClass

public Profile getProfileForClass(java.lang.String profileClass)
Description copied from interface: ProfileManager
Search for a Profile with the given Java classname.

Specified by:
getProfileForClass in interface ProfileManager
Parameters:
profileClass - the name of the Java class to search for.
Returns:
the profile instance for the class or null if there is none.

addToDefaultProfiles

public void addToDefaultProfiles(Profile p)
Description copied from interface: ProfileManager
Add a profile to the default list.

Specified by:
addToDefaultProfiles in interface ProfileManager
Parameters:
p - profile to be added to the default application profiles. New models will reference it by default

getDefaultProfiles

public java.util.List<Profile> getDefaultProfiles()
Specified by:
getDefaultProfiles in interface ProfileManager
Returns:
the default list of profiles

removeFromDefaultProfiles

public void removeFromDefaultProfiles(Profile p)
Description copied from interface: ProfileManager
Remove a profile from the default list.

Specified by:
removeFromDefaultProfiles in interface ProfileManager
Parameters:
p - the profile to be removed

addSearchPathDirectory

public void addSearchPathDirectory(java.lang.String path)
Description copied from interface: ProfileManager
Add a new directory to the directory list.

Specified by:
addSearchPathDirectory in interface ProfileManager
Parameters:
path - a directory name where the manager will try to look for user defined profiles as XMI files

getSearchPathDirectories

public java.util.List<java.lang.String> getSearchPathDirectories()
Specified by:
getSearchPathDirectories in interface ProfileManager
Returns:
the current directory list

removeSearchPathDirectory

public void removeSearchPathDirectory(java.lang.String path)
Description copied from interface: ProfileManager
Remove a directory from the directory list.

Specified by:
removeSearchPathDirectory in interface ProfileManager
Parameters:
path - the directory path to be removed.

refreshRegisteredProfiles

public void refreshRegisteredProfiles()
Description copied from interface: ProfileManager
Look for XMI files at the current directory list and registers them as user defined profiles.

Specified by:
refreshRegisteredProfiles in interface ProfileManager

getUMLProfile

public Profile getUMLProfile()
Specified by:
getUMLProfile in interface ProfileManager
Returns:
the Profile for UML, i.e., the base UML profile as defined by the standard.

lookForRegisteredProfile

public Profile lookForRegisteredProfile(java.lang.String value)
Description copied from interface: ProfileManager
Looks for registered Profile

Specified by:
lookForRegisteredProfile in interface ProfileManager
Parameters:
value - identifier
Returns:
profile

applyConfiguration

public void applyConfiguration(ProfileConfiguration pc)
Description copied from interface: ProfileManager
Apply the given ProfileConfiguration to ArgoUML

Specified by:
applyConfiguration in interface ProfileManager
Parameters:
pc - the profile configuration


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook