eclipseme.core.model.impl
Class Profile

java.lang.Object
  extended byeclipseme.core.model.impl.PlatformComponent
      extended byeclipseme.core.model.impl.Profile
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IPlatformComponent, IProfile, java.io.Serializable

public class Profile
extends PlatformComponent
implements IProfile

Standard implementation of the IProfile interface.

Note: This class/interface is part of an interim API that is still under development and expected to change before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken as the API evolves.

Copyright (c) 2003-2005 Craig Setera
All Rights Reserved.
Licensed under the Eclipse Public License - v 1.0


$Revision: 1.5 $
$Date: 2005/07/07 02:36:58 $

Author:
Craig Setera
See Also:
IProfile, Serialized Form

Nested Class Summary
static class Profile.ProfilePersistenceDelegate
          Persistence support for the Profile class.
 
Constructor Summary
Profile(IWirelessToolkit toolkit, java.lang.String identifier, java.lang.String name)
          Construct a new Profile instance.
Profile(IWirelessToolkit toolkit, java.lang.String identifier, java.lang.String name, Version version)
          Construct a new Profile instance.
 
Method Summary
 void addLibraries(org.eclipse.jdt.core.IClasspathEntry[] libraries)
          Add a set of new libraries to this profile.
 void addLibrary(org.eclipse.jdt.core.IClasspathEntry library)
          Add a new library to this profile.
 org.eclipse.jdt.core.IClasspathEntry[] getLibraries()
          Return the libraries that make up this profile as a set of classpath entries.
 eclipseme.core.model.registry.IPersistenceDelegate getPersistenceDelegate()
          Get the persistence delegate for this particular platform component.
 java.lang.String getSpecificationVersion()
          Return the version of this configuration as defined by the specification.
 IWirelessToolkit getWirelessToolkit()
          Get the wireless toolkit in which this profile is defined or null if not defined by a toolkit.
 void replaceLibrary(int index, org.eclipse.jdt.core.IClasspathEntry replacement)
          Replace the specified library entry with the specified replacement.
 void setSpecificationVersion(java.lang.String specVersion)
          Set the specification version.
 
Methods inherited from class eclipseme.core.model.impl.PlatformComponent
addDependentComponent, getAdapter, getDependentComponents, getIdentifier, getName, getVersion, hasDependentComponents, isDerived, removeDependentComponent, setDerived
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eclipseme.core.model.IPlatformComponent
addDependentComponent, getDependentComponents, getIdentifier, getName, getVersion, hasDependentComponents, isDerived, removeDependentComponent
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

Profile

public Profile(IWirelessToolkit toolkit,
               java.lang.String identifier,
               java.lang.String name,
               Version version)
Construct a new Profile instance.


Profile

public Profile(IWirelessToolkit toolkit,
               java.lang.String identifier,
               java.lang.String name)
Construct a new Profile instance.

Method Detail

addLibrary

public void addLibrary(org.eclipse.jdt.core.IClasspathEntry library)
Add a new library to this profile.

Parameters:
library - the IClasspathEntry to be added to this profile

addLibraries

public void addLibraries(org.eclipse.jdt.core.IClasspathEntry[] libraries)
Add a set of new libraries to this profile.

Parameters:
libraries - an array of IClasspathEntry instances to be added to this profile

getLibraries

public org.eclipse.jdt.core.IClasspathEntry[] getLibraries()
Description copied from interface: IProfile
Return the libraries that make up this profile as a set of classpath entries.

Specified by:
getLibraries in interface IProfile
Returns:
an array of IClasspathEntry instances representing the libraries in the profile.
See Also:
IProfile.getLibraries()

getPersistenceDelegate

public eclipseme.core.model.registry.IPersistenceDelegate getPersistenceDelegate()
Description copied from interface: IPlatformComponent
Get the persistence delegate for this particular platform component.

Specified by:
getPersistenceDelegate in interface IPlatformComponent
Returns:
a persistence delegate for this component
See Also:
IPlatformComponent.getPersistenceDelegate()

getSpecificationVersion

public java.lang.String getSpecificationVersion()
Description copied from interface: IProfile
Return the version of this configuration as defined by the specification.

Specified by:
getSpecificationVersion in interface IProfile
Returns:
the specification version
See Also:
IConfiguration.getSpecificationVersion()

getWirelessToolkit

public IWirelessToolkit getWirelessToolkit()
Description copied from interface: IProfile
Get the wireless toolkit in which this profile is defined or null if not defined by a toolkit.

Specified by:
getWirelessToolkit in interface IProfile
Returns:
The wireless toolkit.
See Also:
IProfile.getWirelessToolkit()

replaceLibrary

public void replaceLibrary(int index,
                           org.eclipse.jdt.core.IClasspathEntry replacement)
Description copied from interface: IProfile
Replace the specified library entry with the specified replacement.

Specified by:
replaceLibrary in interface IProfile
Parameters:
index - the library to be replaced
replacement - the replacement library
See Also:
IProfile.replaceLibrary(int, org.eclipse.jdt.core.IClasspathEntry)

setSpecificationVersion

public void setSpecificationVersion(java.lang.String specVersion)
Set the specification version.

Parameters:
specVersion - the version