org.apache.felix.obrplugin
Class ResourcesBundle

java.lang.Object
  extended by org.apache.felix.obrplugin.ResourcesBundle

public class ResourcesBundle
extends java.lang.Object

this class describe all information by bundle.

Author:
Felix Project Team

Constructor Summary
ResourcesBundle(org.apache.maven.plugin.logging.Log log)
          initialize logger.
 
Method Summary
 void addCapability(Capability capability)
          add a new capability for this bundle description.
 void addCategory(Category category)
          add a new category for this bundle decription.
 void addRequire(Require require)
          add a new requirement for this bundle description.
 boolean construct(org.apache.maven.project.MavenProject project, ExtractBindexInfo ebi, java.lang.String sourcePath, java.lang.String javadocPath)
          this method gets information form pom.xml to complete missing data from those given by user.
 java.util.List getCapability()
           
 java.util.List getCategory()
           
 java.lang.String getDescription()
           
 java.lang.String getDocumentation()
           
 java.lang.String getId()
           
 java.lang.String getJavadoc()
           
 java.lang.String getLicense()
           
 org.w3c.dom.Node getNode(org.w3c.dom.Document father)
          transform this object to Node.
 java.lang.String getPresentationName()
           
 java.util.List getRequire()
           
 java.lang.String getSize()
           
 java.lang.String getSource()
           
 java.lang.String getSymbolicName()
           
 java.lang.String getUri()
           
 java.lang.String getVersion()
           
 boolean isSameBundleResource(java.lang.String symbolicName, java.lang.String version)
          test if this bundle has the same symbolicname, and version number.
 boolean isValid()
          return if the bundle resource is complete.
 void setCapability(java.util.List capability)
           
 void setCategory(java.util.List category)
           
 void setDescription(java.lang.String description)
           
 void setDocumentation(java.lang.String documentation)
           
 void setId(java.lang.String id)
           
 void setJavadoc(java.lang.String javadoc)
           
 void setLicense(java.lang.String license)
           
 void setPresentationName(java.lang.String name)
           
 void setRequire(java.util.List require)
           
 void setSize(java.lang.String size)
           
 void setSource(java.lang.String source)
           
 void setSymbolicName(java.lang.String name)
           
 void setUri(java.lang.String url)
           
 void setVersion(java.lang.String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcesBundle

public ResourcesBundle(org.apache.maven.plugin.logging.Log log)
initialize logger.

Parameters:
log - log use by plugin
Method Detail

getCapability

public java.util.List getCapability()

setCapability

public void setCapability(java.util.List capability)

getCategory

public java.util.List getCategory()

setCategory

public void setCategory(java.util.List category)

getLicense

public java.lang.String getLicense()

setLicense

public void setLicense(java.lang.String license)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getDocumentation

public java.lang.String getDocumentation()

setDocumentation

public void setDocumentation(java.lang.String documentation)

getPresentationName

public java.lang.String getPresentationName()

setPresentationName

public void setPresentationName(java.lang.String name)

getSize

public java.lang.String getSize()

setSize

public void setSize(java.lang.String size)

getSymbolicName

public java.lang.String getSymbolicName()

setSymbolicName

public void setSymbolicName(java.lang.String name)

getUri

public java.lang.String getUri()

setUri

public void setUri(java.lang.String url)

getVersion

public java.lang.String getVersion()

setVersion

public void setVersion(java.lang.String version)

getRequire

public java.util.List getRequire()

setRequire

public void setRequire(java.util.List require)

getSource

public java.lang.String getSource()

setSource

public void setSource(java.lang.String source)

getJavadoc

public java.lang.String getJavadoc()

setJavadoc

public void setJavadoc(java.lang.String javadoc)

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

addCapability

public void addCapability(Capability capability)
add a new capability for this bundle description.

Parameters:
capability - the Capability to add

addRequire

public void addRequire(Require require)
add a new requirement for this bundle description.

Parameters:
require - th Require to add

addCategory

public void addCategory(Category category)
add a new category for this bundle decription.

Parameters:
category - the Category to add

getNode

public org.w3c.dom.Node getNode(org.w3c.dom.Document father)
transform this object to Node. tranform all sub-object to node also

Parameters:
father - father document for create Node
Returns:
node

construct

public boolean construct(org.apache.maven.project.MavenProject project,
                         ExtractBindexInfo ebi,
                         java.lang.String sourcePath,
                         java.lang.String javadocPath)
this method gets information form pom.xml to complete missing data from those given by user.

Parameters:
project - project information given by maven
ebi - bundle information extracted from bindex
sourcePath - path to local sources
javadocPath - path to local javadocs
Returns:
true

isValid

public boolean isValid()
return if the bundle resource is complete.

Returns:
false if an information is missing, else true

isSameBundleResource

public boolean isSameBundleResource(java.lang.String symbolicName,
                                    java.lang.String version)
test if this bundle has the same symbolicname, and version number.

Parameters:
symbolicName - symbolicName to compare with current bundle
presentationName - presentationName to compare with current bundlde
version - version to compare with current bundle
Returns:
true if the information are the same, else false


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.