org.springframework.roo.project
Interface ProjectMetadataProvider

All Superinterfaces:
org.springframework.roo.metadata.MetadataProvider

public interface ProjectMetadataProvider
extends org.springframework.roo.metadata.MetadataProvider

Provides mutability services for ProjectMetadata.

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

Method Summary
 void addBuildPlugin(Plugin plugin)
          Attempts to add the specified build plugin.
 void addDependency(Dependency dependency)
          Attempts to add the specified dependency.
 void addPluginRepository(Repository repository)
          Attempts to add the specified plugin repository.
 void addProperty(Property property)
          Attempts to add the specified property.
 void addRepository(Repository repository)
          Attempts to add the specified repository.
 void removeBuildPlugin(Plugin plugin)
          Attempts to remove the specified build plugin dependency.
 void removeDependency(Dependency dependency)
          Attempts to remove the specified dependency.
 void removePluginRepository(Repository repository)
          Attempts to remove the specified plugin repository.
 void removeProperty(Property property)
          Attempts to remove the specified property dependency.
 void removeRepository(Repository repository)
          Attempts to remove the specified repository.
 void updateProjectType(ProjectType projectType)
          Attempts to update the project packaging type as defined via ProjectType.
 
Methods inherited from interface org.springframework.roo.metadata.MetadataProvider
get, getProvidesType
 

Method Detail

addDependency

void addDependency(Dependency dependency)
Attempts to add the specified dependency. If the dependency already exists according to ProjectMetadata.isDependencyRegistered(Dependency), the method silently returns. Otherwise the dependency is added.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
dependency - to add (required)

removeDependency

void removeDependency(Dependency dependency)
Attempts to remove the specified dependency. If the dependency does not exist according to ProjectMetadata.isDependencyRegistered(Dependency), the method silently returns. Otherwise the located dependency is removed.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
dependency - to remove (required)

addBuildPlugin

void addBuildPlugin(Plugin plugin)
Attempts to add the specified build plugin. If the plugin already exists according to ProjectMetadata.isBuildPluginRegistered(Plugin), the method silently returns. Otherwise the plugin is added.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
plugin - to add (required)

removeBuildPlugin

void removeBuildPlugin(Plugin plugin)
Attempts to remove the specified build plugin dependency. If the dependency does not exist according to ProjectMetadata#isBuildPluginDependencyRegistered(Plugin), the method silently returns. Otherwise the located dependency is removed.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
plugin - to remove (required)

addRepository

void addRepository(Repository repository)
Attempts to add the specified repository. If the repository already exists according to ProjectMetadata.isRepositoryRegistered(Repository), the method silently returns. Otherwise the repository is added.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
repository - to add (required)

removeRepository

void removeRepository(Repository repository)
Attempts to remove the specified repository. If the repository does not exist according to ProjectMetadata.isRepositoryRegistered(Repository), the method silently returns. Otherwise the located repository is removed.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
repository - to remove (required)

addPluginRepository

void addPluginRepository(Repository repository)
Attempts to add the specified plugin repository. If the plugin repository already exists according to ProjectMetadata.isPluginRepositoryRegistered(Repository), the method silently returns. Otherwise the repository is added.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
plugin - repository to add (required)

removePluginRepository

void removePluginRepository(Repository repository)
Attempts to remove the specified plugin repository. If the plugin repository does not exist according to ProjectMetadata.isPluginRepositoryRegistered(Repository), the method silently returns. Otherwise the located plugin repository is removed.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
plugin - repository to remove (required)

addProperty

void addProperty(Property property)
Attempts to add the specified property. If the property already exists according to ProjectMetadata#isBuildPropertyRegistered(Property), the method silently returns. Otherwise the property is added.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
property - to add (required)

removeProperty

void removeProperty(Property property)
Attempts to remove the specified property dependency. If the dependency does not exist according to ProjectMetadata#isPropertyDependencyRegistered(Property), the method silently returns. Otherwise the located dependency is removed.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
property - to remove (required)

updateProjectType

void updateProjectType(ProjectType projectType)
Attempts to update the project packaging type as defined via ProjectType. If the project packaging is not defined it will create a new definition.

An exception is thrown if this method is called before there is ProjectMetadata available, or if the on-disk representation cannot be modified for any reason.

Parameters:
ProjectType - to update (required)


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