org.springframework.roo.project
Class AbstractProjectOperations

java.lang.Object
  extended by org.springframework.roo.project.AbstractProjectOperations
All Implemented Interfaces:
ProjectOperations

public abstract class AbstractProjectOperations
extends Object
implements ProjectOperations

Provides common project operations. Should be subclassed by a project-specific operations subclass.

Since:
1.0
Author:
Ben Alex, Adrian Colyer, Stefan Schmidt, Alan Stewart

Field Summary
protected  org.springframework.roo.metadata.MetadataService metadataService
           
protected  ProjectMetadataProvider projectMetadataProvider
           
 
Constructor Summary
AbstractProjectOperations()
           
 
Method Summary
 void addBuildPlugin(Plugin plugin)
          Allows addition of a build plugin to the POM.
 void addDependency(Dependency dependency)
          Allows addition of a JAR dependency to the POM.
 void addDependency(org.springframework.roo.model.JavaPackage groupId, org.springframework.roo.model.JavaSymbolName artifactId, String version)
          Allows addition of a JAR dependency to the POM.
 void addDependencyListener(DependencyListener listener)
          Register a listener to track changes in build dependencies
 void addPluginListener(PluginListener listener)
          Register a listener to track changes in build plugins
 void addPluginRepository(Repository repository)
          Allows addition of a plugin repository to the POM.
 void addPluginRepositoryListener(RepositoryListener listener)
          Register a listener to track changes in plugin repositories
 void addProperty(Property property)
          Allows addition of a property to the POM.
 void addPropertyListener(PropertyListener listener)
          Register a listener to track changes in pom properties
 void addRepository(Repository repository)
          Allows addition of a repository to the POM.
 void addRepositoryListener(RepositoryListener listener)
          Register a listener to track changes in repositories
 void buildPluginUpdate(Plugin plugin)
          Verifies if the specified build plugin is present.
 void dependencyUpdate(Dependency dependency)
          Verifies if the specified dependency is present.
 boolean isDependencyModificationAllowed()
           
 boolean isPerformCommandAllowed()
           
 void removeBuildPlugin(Plugin plugin)
          Allows remove of an existing build plugin from the POM.
 void removeDependency(Dependency dependency)
          Allows removal of a JAR dependency to the POM.
 void removeDependency(org.springframework.roo.model.JavaPackage groupId, org.springframework.roo.model.JavaSymbolName artifactId, String version)
          Allows remove of an existing JAR dependency from the POM.
 void removeDependencyListener(DependencyListener listener)
          Remove a dependency listener from change tracking
 void removePluginListener(PluginListener listener)
          Remove a build plugin listener from change tracking
 void removePluginRepository(Repository repository)
          Allows remove of an existing plugin repository from the POM.
 void removePluginRepositoryListener(RepositoryListener listener)
          Remove a plugin repository listener from change tracking
 void removeProperty(Property property)
          Allows remove of an existing property from the POM.
 void removePropertyListener(PropertyListener listener)
          Remove a property listener from change tracking
 void removeRepository(Repository repository)
          Allows remove of an existing repository from the POM.
 void removeRepositoryListener(RepositoryListener listener)
          Remove a repository listener from change tracking
 void updateProjectType(ProjectType projectType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metadataService

@Reference
protected org.springframework.roo.metadata.MetadataService metadataService

projectMetadataProvider

@Reference
protected ProjectMetadataProvider projectMetadataProvider
Constructor Detail

AbstractProjectOperations

public AbstractProjectOperations()
Method Detail

isDependencyModificationAllowed

public final boolean isDependencyModificationAllowed()
Specified by:
isDependencyModificationAllowed in interface ProjectOperations

isPerformCommandAllowed

public final boolean isPerformCommandAllowed()
Specified by:
isPerformCommandAllowed in interface ProjectOperations

addDependencyListener

public void addDependencyListener(DependencyListener listener)
Description copied from interface: ProjectOperations
Register a listener to track changes in build dependencies

Specified by:
addDependencyListener in interface ProjectOperations

removeDependencyListener

public void removeDependencyListener(DependencyListener listener)
Description copied from interface: ProjectOperations
Remove a dependency listener from change tracking

Specified by:
removeDependencyListener in interface ProjectOperations

addRepositoryListener

public void addRepositoryListener(RepositoryListener listener)
Description copied from interface: ProjectOperations
Register a listener to track changes in repositories

Specified by:
addRepositoryListener in interface ProjectOperations

removeRepositoryListener

public void removeRepositoryListener(RepositoryListener listener)
Description copied from interface: ProjectOperations
Remove a repository listener from change tracking

Specified by:
removeRepositoryListener in interface ProjectOperations

addPluginRepositoryListener

public void addPluginRepositoryListener(RepositoryListener listener)
Description copied from interface: ProjectOperations
Register a listener to track changes in plugin repositories

Specified by:
addPluginRepositoryListener in interface ProjectOperations

removePluginRepositoryListener

public void removePluginRepositoryListener(RepositoryListener listener)
Description copied from interface: ProjectOperations
Remove a plugin repository listener from change tracking

Specified by:
removePluginRepositoryListener in interface ProjectOperations

addPluginListener

public void addPluginListener(PluginListener listener)
Description copied from interface: ProjectOperations
Register a listener to track changes in build plugins

Specified by:
addPluginListener in interface ProjectOperations

removePluginListener

public void removePluginListener(PluginListener listener)
Description copied from interface: ProjectOperations
Remove a build plugin listener from change tracking

Specified by:
removePluginListener in interface ProjectOperations

addPropertyListener

public void addPropertyListener(PropertyListener listener)
Description copied from interface: ProjectOperations
Register a listener to track changes in pom properties

Specified by:
addPropertyListener in interface ProjectOperations

removePropertyListener

public void removePropertyListener(PropertyListener listener)
Description copied from interface: ProjectOperations
Remove a property listener from change tracking

Specified by:
removePropertyListener in interface ProjectOperations

updateProjectType

public void updateProjectType(ProjectType projectType)
Specified by:
updateProjectType in interface ProjectOperations

addDependency

public final void addDependency(Dependency dependency)
Description copied from interface: ProjectOperations
Allows addition of a JAR dependency to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
addDependency in interface ProjectOperations
Parameters:
dependency - to add (required)

addDependency

public final void addDependency(org.springframework.roo.model.JavaPackage groupId,
                                org.springframework.roo.model.JavaSymbolName artifactId,
                                String version)
Description copied from interface: ProjectOperations
Allows addition of a JAR dependency to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
addDependency in interface ProjectOperations
Parameters:
groupId - to add (required)
artifactId - to add (required)
version - to add (required)

removeDependency

public final void removeDependency(Dependency dependency)
Description copied from interface: ProjectOperations
Allows removal of a JAR dependency to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted dependency from their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
removeDependency in interface ProjectOperations
Parameters:
dependency - to remove (required)

removeDependency

public final void removeDependency(org.springframework.roo.model.JavaPackage groupId,
                                   org.springframework.roo.model.JavaSymbolName artifactId,
                                   String version)
Description copied from interface: ProjectOperations
Allows remove of an existing JAR dependency from the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted dependency from their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
removeDependency in interface ProjectOperations
Parameters:
groupId - to remove (required)
artifactId - to remove (required)
version - to remove (required)

dependencyUpdate

public void dependencyUpdate(Dependency dependency)
Description copied from interface: ProjectOperations
Verifies if the specified dependency is present. If it is present, silently returns. If it is not present, removes any dependency which matches ProjectMetadata.getDependenciesExcludingVersion(Dependency). Always adds the presented dependency.

Specified by:
dependencyUpdate in interface ProjectOperations
Parameters:
dependency - to add (required)

addRepository

public final void addRepository(Repository repository)
Description copied from interface: ProjectOperations
Allows addition of a repository to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
addRepository in interface ProjectOperations
Parameters:
repository - to add (required)

removeRepository

public final void removeRepository(Repository repository)
Description copied from interface: ProjectOperations
Allows remove of an existing repository from the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted repository from their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
removeRepository in interface ProjectOperations
Parameters:
repository - to remove (required)

addPluginRepository

public final void addPluginRepository(Repository repository)
Description copied from interface: ProjectOperations
Allows addition of a plugin repository to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
addPluginRepository in interface ProjectOperations
Parameters:
repository - to add (required)

removePluginRepository

public final void removePluginRepository(Repository repository)
Description copied from interface: ProjectOperations
Allows remove of an existing plugin repository from the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted plugin repository from their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
removePluginRepository in interface ProjectOperations

addBuildPlugin

public final void addBuildPlugin(Plugin plugin)
Description copied from interface: ProjectOperations
Allows addition of a build plugin to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to add a new build capability to their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
addBuildPlugin in interface ProjectOperations
Parameters:
plugin - to add (required)

removeBuildPlugin

public final void removeBuildPlugin(Plugin plugin)
Description copied from interface: ProjectOperations
Allows remove of an existing build plugin from the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted build plugin from their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
removeBuildPlugin in interface ProjectOperations
Parameters:
plugin - to add (required)

buildPluginUpdate

public void buildPluginUpdate(Plugin plugin)
Description copied from interface: ProjectOperations
Verifies if the specified build plugin is present. If it is present, silently returns. If it is not present, removes any build plugin which matches ProjectMetadata.getBuildPluginsExcludingVersion(Plugin). Always adds the presented plugin.

Specified by:
buildPluginUpdate in interface ProjectOperations

addProperty

public final void addProperty(Property property)
Description copied from interface: ProjectOperations
Allows addition of a property to the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
addProperty in interface ProjectOperations
Parameters:
property - to add (required)

removeProperty

public final void removeProperty(Property property)
Description copied from interface: ProjectOperations
Allows remove of an existing property from the POM.

Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted property from their projects without requiring the user to manually edit a pom.xml or write an add-on.

Specified by:
removeProperty in interface ProjectOperations
Parameters:
property - to remove (required)


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.