org.apache.felix.deploymentadmin
Class AbstractInfo

java.lang.Object
  extended by org.apache.felix.deploymentadmin.AbstractInfo
Direct Known Subclasses:
BundleInfoImpl, ResourceInfoImpl

public class AbstractInfo
extends Object

Objects of this class represent the meta data for a resource from a deployment package, this can be either bundle resources or processed resources.


Constructor Summary
AbstractInfo(String path, Attributes attributes)
          Create an instance
 
Method Summary
 String getHeader(String header)
          Return the value of a header for this resource
 String getPath()
           
 boolean isMissing()
          Determine if a resource is missing or not
protected  boolean parseBooleanHeader(Attributes attributes, String header)
          Parses a header that is allowed to have only boolean values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInfo

public AbstractInfo(String path,
                    Attributes attributes)
             throws DeploymentException
Create an instance

Parameters:
path - Resource-id aka path of the resource
attributes - Attributes containing the meta data of the resource
Throws:
DeploymentException - If the specified attributes do not match the correct syntax for a deployment package resource.
Method Detail

getPath

public String getPath()
Returns:
The path of the resource

getHeader

public String getHeader(String header)
Return the value of a header for this resource

Parameters:
header - Name of the header
Returns:
Value of the header specified by the given header name

isMissing

public boolean isMissing()
Determine if a resource is missing or not

Returns:
True if the actual data for this resource is not present, false otherwise

parseBooleanHeader

protected boolean parseBooleanHeader(Attributes attributes,
                                     String header)
                              throws DeploymentException
Parses a header that is allowed to have only boolean values.

Parameters:
attributes - Set of attributes containing the header
header - The header to verify
Returns:
true if the value of the header was "true", false if the value was "false"
Throws:
DeploymentException - if the value was not "true" or "false"


Copyright © 2011 Apache Software Foundation. All Rights Reserved.