Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.aries.application;
package org.apache.aries.application;

import java.io.File;
import java.io.IOException;
Expand All @@ -27,71 +27,70 @@
import org.osgi.framework.Version;

/**
* A representation of an APPLICATION.MF file.
* A representation of an APPLICATION.MF file.
*
*/
public interface ApplicationMetadata
{
public interface ApplicationMetadata {
/**
* get the value of the Application-SymbolicName header
* @return the value of the Application-SymbolicName header
*/
public String getApplicationSymbolicName();
String getApplicationSymbolicName();

/**
* get the value of the Application-Version header
* @return the value of the Application-Version header
*/
public Version getApplicationVersion();
Version getApplicationVersion();

/**
* get the name of the application
* @return the name of the application
*/
public String getApplicationName();
String getApplicationName();
/**
* get the list of Application contents includes bundle name,
* get the list of Application contents includes bundle name,
* version, directives and attributes
* @return the list of the Application contents
* @return the list of the Application contents
*/
public List<Content> getApplicationContents();
List<Content> getApplicationContents();

/**
* get the value of the Export-Service header
* @return the list of ServiceDeclaration
*/
public List<ServiceDeclaration> getApplicationExportServices();
List<ServiceDeclaration> getApplicationExportServices();

/**
* get the value of the Import-Service header
* @return the list of ServiceDeclaration
*/
public List<ServiceDeclaration> getApplicationImportServices();
List<ServiceDeclaration> getApplicationImportServices();

/**
* get the value of the Application-Scope, which is
* get the value of the Application-Scope, which is
* calculated from Application-SymbolicName and Application-Version
* @return the value of the AppScope
*/
public String getApplicationScope();
String getApplicationScope();

/**
* get the list of use-bundle content including bundle symbolic name and version range
* @return the collection of use bundles.
*/
public Collection<Content> getUseBundles();
/**
* Persist this metadata.
Collection<Content> getUseBundles();

/**
* Persist this metadata.
* @param f The file to store this metadata to
* @throws IOException
*/
public void store(File f) throws IOException;
/**
* Persist this metadata.
void store(File f) throws IOException;

/**
* Persist this metadata.
* @param out The output stream to store this metadata to
* @throws IOException
*/
public void store(OutputStream out) throws IOException;
void store(OutputStream out) throws IOException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
* Provides various means of generating {@link org.apache.aries.application.ApplicationMetadata
* ApplicationMetadata} instances.
*/
public interface ApplicationMetadataFactory
{
public interface ApplicationMetadataFactory {

/**
* Parse from the input stream the application manifest. This method is more
Expand All @@ -38,7 +37,7 @@ public interface ApplicationMetadataFactory
* @return the parsed application metadata.
*
*/
public ApplicationMetadata parseApplicationMetadata(InputStream in) throws IOException;
ApplicationMetadata parseApplicationMetadata(InputStream in) throws IOException;

/**
* Create the application metadata from the provided Manifest. This is provided
Expand All @@ -48,6 +47,6 @@ public interface ApplicationMetadataFactory
* @param man the manifest to read from
* @return the parsed application metadata.
*/
public ApplicationMetadata createApplicationMetadata(Manifest man);
ApplicationMetadata createApplicationMetadata(Manifest man);

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,49 +27,48 @@
* A representation of content metadata such as Application-Content, Import-Package, etc
*
*/
public interface Content
{
public interface Content {
/**
* get the content name of the content
* @return the content name of the content
*/
public String getContentName();
String getContentName();

/**
* get the attributes of the content
* @return the attributes of the content
*/
public Map<String, String> getAttributes();
Map<String, String> getAttributes();

/**
* get the directives of the content
* @return the directives of the content
*/
public Map<String, String> getDirectives();
Map<String, String> getDirectives();

/**
* get the value of the attribute with the specified key
* @param key
* @return value of the attribute specified by the key
*/
public String getAttribute(String key);
String getAttribute(String key);

/**
* get the value of the directive with the specified key
* @param key
* @return the value of the directive specified by the key
*/
public String getDirective(String key);
String getDirective(String key);

/**
* get the version info for the version attribute
* @return null if there is no version associated with this content
*/
public VersionRange getVersion();
VersionRange getVersion();

/**
* get the attribute and directive info in NameValueMap
* @return namevalueMap that contains attribute and directive info
*/
public Map<String, String> getNameValueMap();
Map<String, String> getNameValueMap();
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public interface DeploymentContent extends Content {
* this cannot be null
* @return the exact version
*/
public Version getExactVersion();
Version getExactVersion();

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,70 +39,70 @@ public interface DeploymentMetadata {
* get the value of the Application-SymbolicName header
* @return the value of the Application-SymbolicName header
*/
public String getApplicationSymbolicName();
String getApplicationSymbolicName();

/**
* get the value of the Application-Version header
* @return the value of the Application-Version header
*/
public Version getApplicationVersion();
Version getApplicationVersion();

/**
* get the value of the Deployed-Content header
* @return the list of the deployed content
*/
public List<DeploymentContent> getApplicationDeploymentContents();
List<DeploymentContent> getApplicationDeploymentContents();

/**
* get the value of the Provision-Bundle header
* @return the list of non-app bundles to provision.
*/
public List<DeploymentContent> getApplicationProvisionBundles();
List<DeploymentContent> getApplicationProvisionBundles();

/**
* get the value of Deployed-UseBundle header
*
* @return the list of bundles to use from the deployment.
*/
public Collection<DeploymentContent> getDeployedUseBundle();
Collection<DeploymentContent> getDeployedUseBundle();

/**
* get the value of Import-Package
* @return all the packages to import from non-app content.
*/
public Collection<Content> getImportPackage();
Collection<Content> getImportPackage();

/**
* Get the list of DeployedService-Import
* @return DeployedService-Import
*/
public Collection<Filter> getDeployedServiceImport();
Collection<Filter> getDeployedServiceImport();

/**
* get the contents of deployment manifest in a map
* @return the required feature map
*/
public Map<String, String> getHeaders();
Map<String, String> getHeaders();
/**
* Obtain the associated
* {@link org.apache.aries.application.ApplicationMetadata ApplicationMetadata}.
* @return The application metadata.
*/
public ApplicationMetadata getApplicationMetadata();
ApplicationMetadata getApplicationMetadata();

/**
* Persist this metadata as Manifest-formatted text.
* @param f The file to store this metadata to
* @throws IOException
*/
public void store(File f) throws IOException;
void store(File f) throws IOException;

/**
* Persist this metadata.
* @param out The OutputStream to store this metadata to.
* @throws IOException
*/

public void store(OutputStream out) throws IOException;
void store(OutputStream out) throws IOException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface DeploymentMetadataFactory {
* @return DeploymentMetadata instance
*/
@Deprecated
public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<BundleInfo> bundleInfo)
DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<BundleInfo> bundleInfo)
throws ResolverException;

/**
Expand All @@ -54,7 +54,7 @@ public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<Bu
* @return DeploymentMetadata instance
*/
@Deprecated
public DeploymentMetadata createDeploymentMetadata (IFile src) throws IOException;
DeploymentMetadata createDeploymentMetadata (IFile src) throws IOException;


/**
Expand All @@ -64,7 +64,7 @@ public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<Bu
* @throws IOException
* @return DeploymentMetadata instance
*/
public DeploymentMetadata parseDeploymentMetadata (IFile src) throws IOException;
DeploymentMetadata parseDeploymentMetadata (IFile src) throws IOException;

/**
* Deprecated. Use parseDeploymentMetadata.
Expand All @@ -74,7 +74,7 @@ public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<Bu
* @return DeploymentMetadata instance
*/
@Deprecated
public DeploymentMetadata createDeploymentMetadata (InputStream in) throws IOException;
DeploymentMetadata createDeploymentMetadata (InputStream in) throws IOException;

/**
* Extract a DeploymentMetadata instance from InputStream.
Expand All @@ -83,7 +83,7 @@ public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<Bu
* @throws IOException
* @return DeploymentMetadata instance
*/
public DeploymentMetadata parseDeploymentMetadata (InputStream in) throws IOException;
DeploymentMetadata parseDeploymentMetadata (InputStream in) throws IOException;

/**
* Extract a DeploymentMetadata instance from Manifest.
Expand All @@ -92,6 +92,6 @@ public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<Bu
* @throws IOException
* @return DeploymentMetadata instance
*/
public DeploymentMetadata createDeploymentMetadata (Manifest manifest) throws IOException;
DeploymentMetadata createDeploymentMetadata (Manifest manifest) throws IOException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public interface ServiceDeclaration {
* get the interface name for the service
* @return The name of the service's interface class.
*/
public abstract String getInterfaceName();
String getInterfaceName();

/**
* get the filter for the service
* @return the filter for the service or null if there is no filter defined
*/
public abstract Filter getFilter();
Filter getFilter();

}
Loading
Loading