Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2010 VMware Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: VMware Inc. - initial contribution /
 
 
 package org.eclipse.virgo.kernel.model.management;
 
 
 import  org.eclipse.equinox.region.Region;
An strategy interface for creating object names based on an input Artifact

Concurrent Semantics
Implementations must be threadsafe

 
 public interface RuntimeArtifactModelObjectNameCreator {

    
Create an Model ObjectName based on an input Artifact. Names generated from equal ( AbstractArtifact.equals(Object)) Artifacts should be equal as well.

Parameters:
artifact The artifact to generate an ObjectName for
Returns:
The ObjectName for the Artifact
 
     ObjectName createModel(Artifact artifact);

    
Create an ArtifactModel ObjectName based on an input Artifact. Names generated from equal ( AbstractArtifact.equals(Object)) Artifacts should be equal as well.

Parameters:
artifact The artifact to generate an ObjectName for
Returns:
The ObjectName for the Artifact
 
     ObjectName createArtifactModel(Artifact artifact);

    
Creates a Model ObjectName based on an input type, name, and version.

Parameters:
type The type of the object to create an @{link ObjectName} for
name The name of the object to create an @{link ObjectName} for
version The version of the object to create an @{link ObjectName} for
Returns:
An ObjectName for the runtime artifact represented by this type, name, and version
 
     ObjectName createModel(String typeString nameVersion version);

    
Creates an ArtifactModel ObjectName based on an input type, name, version, and region.

Parameters:
type The type of the object to create an @{link ObjectName} for
name The name of the object to create an @{link ObjectName} for
version The version of the object to create an @{link ObjectName} for
region The Region of the object to create an @{link ObjectName} for
Returns:
An ObjectName for the runtime artifact represented by this type, name, version, and region
 
     ObjectName createArtifactModel(String typeString nameVersion version, Region region);

    
Creates a query ObjectName that can be used to enumerate all of the user region artifacts in the runtime artifact model

Returns:
An ObjectName that can be used for querying
 
     ObjectName createArtifactsQuery();

    
Creates a query ObjectName that can be used to enumerate all of the artifacts in the runtime artifact models for both user and kernel regions

Returns:
An ObjectName that can be used for querying
 
Creates a query ObjectName that can be used to enumerate all of the artifacts of a given type in the runtime artifact model

Parameters:
type The type of artifacts to query for
Returns:
An ObjectName that can be used for querying
 
Creates a query ObjectName that can be used to enumerate all of the versions of a given artifact type and name in the runtime artifact model

Parameters:
type The type of artifacts to query for
name The name of artifacts to query for
Returns:
An ObjectName that can be used for querying
    ObjectName createArtifactVersionsQuery(String typeString name);

    
Gets the type of an artifact identified by an ObjectName

Parameters:
objectName The identifying ObjectName
Returns:
The type of the artifact
    String getType(ObjectName objectName);

    
Gets the name of an artifact identified by an ObjectName

Parameters:
objectName The identifying ObjectName
Returns:
The name of the artifact
    String getName(ObjectName objectName);

    
Gets the version of an artifact identified by an ObjectName

Parameters:
objectName The identifying ObjectName
Returns:
The version of the artifact
    String getVersion(ObjectName objectName);
New to GrepCode? Check out our FAQ X