Package com.nomagic.ci.persistence
Interface IProject
- 
- All Superinterfaces:
 Serviceable
- All Known Subinterfaces:
 IAttachedProject,IPrimaryProject
@OpenApiAll public interface IProject extends Serviceable
Represents a compound bundle of 'things' that are persisted as a whole. How this persistence works is entirely up to implementations. This interface is typically not directly implemented, but serves as the base class for other interfaces. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddProjectListener(com.nomagic.ci.persistence.ProjectListener projectListener)Adds listener to project's listener listjava.lang.StringgetDescription()Gets the project description.<T extends com.nomagic.ci.persistence.features.IProjectFeature>
TgetFeature(java.lang.Class<T> featureType)Gets the installed feature by feature type.com.nomagic.ci.persistence.features.FeatureDataManagergetFeatureDataManager(com.nomagic.ci.persistence.features.IProjectFeatureDescriptor feature, com.nomagic.ci.persistence.features.FeatureDataSetFilter... featureResourceFilters)Gets feature data manager for given feature where feature data sets for managing are limited to those defined by provided filters.java.util.Set<java.lang.String>getInstalledFeatures()Gets the set of feature names that has been installed in this project.org.eclipse.emf.common.util.URIgetLocationURI()Gets the project URI.java.lang.StringgetName()Returns the project namecom.nomagic.ci.persistence.ProjectDescriptorgetProjectDescriptor()Returns project descriptor.java.lang.StringgetProjectID()Gets the project ID.java.util.List<com.nomagic.ci.persistence.ProjectListener>getProjectListeners()Gets all registered project listenerscom.nomagic.ci.persistence.IProjectRepositorygetProjectRepository()Returns project repository where project is stored.org.eclipse.emf.ecore.resource.ResourceSetgetResourceSet()Gets the resource set used by this project.voidinstallFeatures(java.util.Set<java.lang.String> featureNames, org.eclipse.core.runtime.IProgressMonitor monitor)Installs given features to the primary project.booleanisNew()Determines, whether the project is new, that is, if it newer was saved beforebooleanisReadOnly()Returns repository state.voidremoveProjectListener(com.nomagic.ci.persistence.ProjectListener projectListener)Removes listener from notified listvoidsetDescription(java.lang.String description)Sets the project descriptionvoidsetName(java.lang.String name)Sets the project namevoiduninstallFeatures(java.util.Set<java.lang.String> featureNames, org.eclipse.core.runtime.IProgressMonitor monitor)Remove data associated with the feature.- 
Methods inherited from interface com.nomagic.ci.persistence.services.Serviceable
getService, getServiceOrFail, registerService 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getProjectRepository
com.nomagic.ci.persistence.IProjectRepository getProjectRepository()
Returns project repository where project is stored.- Returns:
 - owning project repository
 
 
- 
getLocationURI
org.eclipse.emf.common.util.URI getLocationURI()
Gets the project URI.- Returns:
 - a URI designating the project location of this instance.
 
 
- 
getProjectID
java.lang.String getProjectID()
Gets the project ID.- Returns:
 - project ID that doesn't change though project life cycle.
 
 
- 
isReadOnly
boolean isReadOnly()
Returns repository state. True if write operation not allowed.- Returns:
 - true if read only
 
 
- 
getName
java.lang.String getName()
Returns the project name- Returns:
 - the project name
 
 
- 
setName
void setName(java.lang.String name)
Sets the project name- Parameters:
 name- the name to set
 
- 
getDescription
java.lang.String getDescription()
Gets the project description.- Returns:
 - project description string
 
 
- 
setDescription
void setDescription(java.lang.String description)
Sets the project description- Parameters:
 description- project description string
 
- 
getProjectDescriptor
com.nomagic.ci.persistence.ProjectDescriptor getProjectDescriptor()
Returns project descriptor. The same asIProjectRepository.getProjectDescriptor(URI, IProgressMonitor), but also return a descriptor if the project is new.- Returns:
 - the project descriptor
 
 
- 
getFeature
<T extends com.nomagic.ci.persistence.features.IProjectFeature> T getFeature(java.lang.Class<T> featureType)
Gets the installed feature by feature type.- Type Parameters:
 T- type of the feature- Parameters:
 featureType- feature class- Returns:
 - The project feature or null if feature was not installed the project
 
 
- 
getInstalledFeatures
java.util.Set<java.lang.String> getInstalledFeatures()
Gets the set of feature names that has been installed in this project. If there are no features installed returns empty set- Returns:
 - set of feature descriptors.
 
 
- 
getFeatureDataManager
com.nomagic.ci.persistence.features.FeatureDataManager getFeatureDataManager(com.nomagic.ci.persistence.features.IProjectFeatureDescriptor feature, @CheckForNull com.nomagic.ci.persistence.features.FeatureDataSetFilter... featureResourceFilters)Gets feature data manager for given feature where feature data sets for managing are limited to those defined by provided filters. Note: if certain filters conflict with each other, then the behavior of the resource manager is not specified. Conflicting filters are such filters that accept non-intersecting scopes of all data sets- Parameters:
 feature- the featurefeatureResourceFilters- the feature data set filter- Returns:
 - the manager for managing feature data sets
 
 
- 
installFeatures
void installFeatures(java.util.Set<java.lang.String> featureNames, org.eclipse.core.runtime.IProgressMonitor monitor) throws com.nomagic.ci.persistence.PersistenceExceptionInstalls given features to the primary project. Any required features will be installed as well. The method has no effect only if the required feature is already installed.- Parameters:
 featureNames- names of the features to installmonitor- the progress monitor for the operation- Throws:
 com.nomagic.ci.persistence.PersistenceException
 
- 
uninstallFeatures
void uninstallFeatures(java.util.Set<java.lang.String> featureNames, org.eclipse.core.runtime.IProgressMonitor monitor) throws com.nomagic.ci.persistence.PersistenceExceptionRemove data associated with the feature. Any dependent features will be removed as well.- Parameters:
 featureNames- names of the features to un-installmonitor- the progress monitor for the operation- Throws:
 com.nomagic.ci.persistence.PersistenceException
 
- 
getResourceSet
org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Gets the resource set used by this project.- Returns:
 - the resource set.
 
 
- 
isNew
boolean isNew()
Determines, whether the project is new, that is, if it newer was saved before- Returns:
 trueif project is new, otherwisefalse
 
- 
addProjectListener
void addProjectListener(com.nomagic.ci.persistence.ProjectListener projectListener)
Adds listener to project's listener list- Parameters:
 projectListener- that should be
 
- 
removeProjectListener
void removeProjectListener(com.nomagic.ci.persistence.ProjectListener projectListener)
Removes listener from notified list- Parameters:
 projectListener- pro
 
- 
getProjectListeners
java.util.List<com.nomagic.ci.persistence.ProjectListener> getProjectListeners()
Gets all registered project listeners- Returns:
 - all listeners that are subscribed
 
 
 - 
 
 -