Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.model_management

Class ProfileRegistry

com.gentleware.poseidon.model_management.ProfileRegistry

public abstract class ProfileRegistry


This class provides the basic operations for handling profiles.


 Attribute Summary
public static String  ACTIVE_PROFILE_PROPERTY
 
private static String  CUSTOM_PROFILE_KEY_POSTFIX
 
public static String  DEACTIVATE_ALL_PROFILES
 
public static String  LOADED_PROFILE_PROPERTY
 
private String  _customProfileKey
 
private Map  _profileResourceIds
 
private Map  _profiles
 
arrow_up
 

 Association Summary
private Configuration  _configuration
 
private PropertyChangeSupport  _profileChangeSupport
 
private RefPackage  _profileExtentPackage
 
private PoseidonProject  _profileProject
 
public KitManager  kitManager
 
arrow_up
 

 Constructor Summary
public   ProfileRegistry(PoseidonProject profileProject)
 
arrow_up
 

 Method Summary
public final void   addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
 
protected Profile   createProfile(String profileName, String profileLocation, PoseidonProject profileProject, ClassLoader loader, String moduleName, String language, ResourceId profileResourceId)
 
protected RefPackage   createProfileExtentPackage(String profileExtentPackageName)
 
public final void   deactivateAllProfiles()
 
public final void   deregisterAllProfiles()
Removes all registered profiles and unloads their models. 
public final void   deregisterProfile(String profileName)
Removes a profile from the list of known profiles and unloads its elements from the profile model. 
protected void   finalize()
 
private RefPackage   findOrCreateProfileExtentPackage(String profileExtentPackageName)
 
protected final void   fireProfileChange(String propertyName, Object oldValue, Object newValue)
 
public final Collection   getActiveProfiles()
 
public final Collection   getLoadedProfiles()
 
private RefObject   getNewlyLoadedProfileModel(Collection previouslyLoadedModels, String profileName)
Locates the model created in the profile model by adding a new profile. 
public final Profile   getProfile(String profileName)
Returns the profile with the given name. 
public final Profile   getProfileByModuleName(String moduleName)
Returns the (first found) profile with the given module-name. 
protected final RefPackage   getProfileExtentPackage()

Returns the extent-package which contains all profile-models which are loaded yet. 

protected Collection   getProfileExtentPackageModels()
 
protected String   getProfileExtentPackageName()
Must return the extent-name for the profile-extent-package. 
public final Project   getProfileProject()
 
public final Collection   getRegisteredProfiles()
Returns all profiles currently registered despite of the _testProject they are valid for. 
public final boolean   isRegistered(String profileName)
Returns true if a profile with the given name is already registered. 
public final boolean   isRegistered(Profile profile)
 
protected boolean   isTopLevelModel(RefObject currentModel)
 
public final void   loadProfile(String profileName)
Loads the profile associated to the given name from its file system location into the profile model. 
private void   loadProfileFromConfiguration(String configurationProfilePath)
 
protected void   loadProfileIntoExtentPackage(PoseidonProject profileProject, InputStream locationStream, RefPackage profileExtentPackage)
 
private void   loadProfilesFromConfiguration(String configurationKey)
Loads the profiles as given by the paths set for the given configurationKey
public final void   registerProfile(ResourceId profileResourceId, String profileName, String profileLocation)
Creates a new profile instance and associates it with a name. 
public final void   registerProfile(ResourceId profileResourceId, String profileName, String profileLocation, ClassLoader loader)
Creates a new profile instance and associates it with a name. 
public final void   registerProfile(ResourceId profileResourceId, String profileName, String profileLocation, ClassLoader loader, String moduleName)
 
public final void   registerProfile(ResourceId profileResourceId, String profileName, String profileLocation, ClassLoader loader, String moduleName, String language)
Registeres a new profile if it is not existant yet with the given name. 
public final void   removeCustomProfilePathFromConfiguration(String profileLocation)
 
public final void   removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
 
public final void   saveCustomProfilePathToConfiguration(String profileLocation)
 
public final void   setProfileActive(String profileName, boolean active)
 
public final void   unloadProfile(String profileName)
Removes the elements of the profile from the profile model. 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 37
gentleware-imported-package-statement-line-number 5
 

 Attribute Detail

ACTIVE_PROFILE_PROPERTY

public static String ACTIVE_PROFILE_PROPERTY

arrow_up


CUSTOM_PROFILE_KEY_POSTFIX

private static String CUSTOM_PROFILE_KEY_POSTFIX

arrow_up


DEACTIVATE_ALL_PROFILES

public static String DEACTIVATE_ALL_PROFILES

arrow_up


LOADED_PROFILE_PROPERTY

public static String LOADED_PROFILE_PROPERTY

arrow_up


_customProfileKey

private String _customProfileKey

arrow_up


_profileResourceIds

private Map _profileResourceIds

arrow_up


_profiles

private Map _profiles

arrow_up
 Association Detail

_configuration

private Configuration _configuration

arrow_up


_profileChangeSupport

private PropertyChangeSupport _profileChangeSupport

arrow_up


_profileExtentPackage

private RefPackage _profileExtentPackage

arrow_up


_profileProject

private PoseidonProject _profileProject

arrow_up


kitManager

public KitManager kitManager

arrow_up
 Constructor Detail

ProfileRegistry

public com.gentleware.poseidon.model_management.ProfileRegistry ProfileRegistry(PoseidonProject profileProject)

Parameters:
profileProject -
Returns:
arrow_up
 Method Detail

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)

Parameters:
propertyChangeListener -
arrow_up


createProfile

protected Profile createProfile(String profileName, String profileLocation, PoseidonProject profileProject, ClassLoader loader, String moduleName, String language, ResourceId profileResourceId)

Parameters:
profileName -
profileLocation -
profileProject -
loader -
moduleName -
language -
profileResourceId -
Returns:
arrow_up


createProfileExtentPackage

protected RefPackage createProfileExtentPackage(String profileExtentPackageName)

Parameters:
profileExtentPackageName -
Returns:
arrow_up


deactivateAllProfiles

public final void deactivateAllProfiles()

arrow_up


deregisterAllProfiles

public final void deregisterAllProfiles()


Removes all registered profiles and unloads their models.  
arrow_up


deregisterProfile

public final void deregisterProfile(String profileName)


Removes a profile from the list of known profiles and unloads its elements from the profile model.  
Parameters:
profileName - The registration name of the profile to deregister.
arrow_up


finalize

protected void finalize()

arrow_up


findOrCreateProfileExtentPackage

private RefPackage findOrCreateProfileExtentPackage(String profileExtentPackageName)

Parameters:
profileExtentPackageName -
Returns:
arrow_up


fireProfileChange

protected final void fireProfileChange(String propertyName, Object oldValue, Object newValue)

Parameters:
propertyName -
oldValue -
newValue -
arrow_up


getActiveProfiles

public final Collection getActiveProfiles()

Returns:
arrow_up


getLoadedProfiles

public final Collection getLoadedProfiles()

Returns:
arrow_up


getNewlyLoadedProfileModel

private RefObject getNewlyLoadedProfileModel(Collection previouslyLoadedModels, String profileName)


Locates the model created in the profile model by adding a new profile. This operation works only once per added model.  
Parameters:
previouslyLoadedModels -
profileName -
Returns:
The model added by loading a new profile.
arrow_up


getProfile

public final Profile getProfile(String profileName)


Returns the profile with the given name.  
Parameters:
profileName - The name of the profile to look up.
Returns:
The profile with the given name.
Exceptions:
ProfileException if profile is cannot be found in registry
arrow_up


getProfileByModuleName

public final Profile getProfileByModuleName(String moduleName)


Returns the (first found) profile with the given module-name. null if no such profile could be found.  
Parameters:
moduleName - the (hopefully unique) model-name of the profile to look for
Returns:
(first) profile found or null if no such profile could be found
arrow_up


getProfileExtentPackage

protected final RefPackage getProfileExtentPackage()


Returns the extent-package which contains all profile-models which are loaded yet.

 
Returns:
an extent-package like e. g. returned by {@link ProjectTypeMdrFacade#createM1Package(String)}
arrow_up


getProfileExtentPackageModels

protected Collection getProfileExtentPackageModels()

Returns:
arrow_up


getProfileExtentPackageName

protected String getProfileExtentPackageName()


Must return the extent-name for the profile-extent-package.  
Returns:
extent-name
arrow_up


getProfileProject

public final Project getProfileProject()

Returns:
arrow_up


getRegisteredProfiles

public final Collection getRegisteredProfiles()


Returns all profiles currently registered despite of the _testProject they are valid for.  
Returns:
A collection of all registered profiles.
arrow_up


isRegistered

public final boolean isRegistered(String profileName)


Returns true if a profile with the given name is already registered.  
Parameters:
profileName - the profile-name to look for
Returns:
true, if profile exists with that name; false otherwise
arrow_up


isRegistered

public final boolean isRegistered(Profile profile)

Parameters:
profile -
Returns:
arrow_up


isTopLevelModel

protected boolean isTopLevelModel(RefObject currentModel)

Parameters:
currentModel -
Returns:
arrow_up


loadProfile

public final void loadProfile(String profileName)


Loads the profile associated to the given name from its file system location into the profile model. This operation has to be executed before elements defined on the profile can be used.  
Parameters:
profileName - The registration name of the profile to load.
Exceptions:
ProfileException if either there is no such profile registered or if the profile could not be found at the given location
arrow_up


loadProfileFromConfiguration

private void loadProfileFromConfiguration(String configurationProfilePath)

Parameters:
configurationProfilePath -
arrow_up


loadProfileIntoExtentPackage

protected void loadProfileIntoExtentPackage(PoseidonProject profileProject, InputStream locationStream, RefPackage profileExtentPackage)

Parameters:
profileProject -
locationStream -
profileExtentPackage -
arrow_up


loadProfilesFromConfiguration

private void loadProfilesFromConfiguration(String configurationKey)


Loads the profiles as given by the paths set for the given configurationKey.  
Parameters:
configurationKey - the key where to search for profile-paths inside the {@link Configuration}
arrow_up


registerProfile

public final void registerProfile(ResourceId profileResourceId, String profileName, String profileLocation)


Creates a new profile instance and associates it with a name. Profiles have to be registered before they can be loaded or used in other ways. Each profile can be registered only once.  
Parameters:
profileResourceId -
profileName - The registration name for the new profile.
profileLocation - The location of the file defining the content of the new profile.
arrow_up


registerProfile

public final void registerProfile(ResourceId profileResourceId, String profileName, String profileLocation, ClassLoader loader)


Creates a new profile instance and associates it with a name. Profiles have to be registered before they can be loaded or used in other ways. Each profile can be registered only once.  
Parameters:
profileResourceId -
profileName - The registration name for the new profile.
profileLocation - The location of the file defining the content of the new profile.
loader - The profile class loader
arrow_up


registerProfile

public final void registerProfile(ResourceId profileResourceId, String profileName, String profileLocation, ClassLoader loader, String moduleName)

Parameters:
profileResourceId -
profileName -
profileLocation -
loader -
moduleName -
arrow_up


registerProfile

public final void registerProfile(ResourceId profileResourceId, String profileName, String profileLocation, ClassLoader loader, String moduleName, String language)


Registeres a new profile if it is not existant yet with the given name. Otherwise registering a profile with an already existing name will have no effect.  
Parameters:
profileResourceId -
profileName - the name of the profile to register
profileLocation - where the xmi-file could be found
loader - classloader to use; null if no classloader should be used to locate the file
moduleName - the name as by which the module should be presented to the user; if null, the profileLocation will be visible to the user
language - the (programming-)language this profile is for; if null, the profile will not show up at some places, e. g. in the code-preview
arrow_up


removeCustomProfilePathFromConfiguration

public final void removeCustomProfilePathFromConfiguration(String profileLocation)

Parameters:
profileLocation -
arrow_up


removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)

Parameters:
propertyChangeListener -
arrow_up


saveCustomProfilePathToConfiguration

public final void saveCustomProfilePathToConfiguration(String profileLocation)

Parameters:
profileLocation -
arrow_up


setProfileActive

public final void setProfileActive(String profileName, boolean active)

Parameters:
profileName -
active -
arrow_up


unloadProfile

public final void unloadProfile(String profileName)


Removes the elements of the profile from the profile model.  
Parameters:
profileName - The registration name of the profile to remove all elements for.
Exceptions:
ProfileException if profile is not registered
arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.