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;
import  org.eclipse.equinox.region.Region;
A single in-memory repository with representations of all artifacts in the running system. Operations are generally executed against the artifacts themselves rather than the repository. Concurrent Semantics
Implementations must be threadsafe
public interface RuntimeArtifactRepository {

    
Add an Artifact to this repository

Parameters:
artifact The Artifact to add
Returns:
true if this repository did not already contain the specified Artifact
See also:
Set
    boolean add(Artifact artifact);

    
Remove an Artifact from this repository. If the artifact is a bundle, it is only removed if the bundle is in the user region.

Parameters:
artifact The Artifact to remove
Returns:
true if this repository contained the specified Artifact
    boolean remove(Artifact artifact);

    
Remove an Artifact from this repository. If the artifact is a bundle, it is only removed if the bundle is in the user region.

Parameters:
type The type of the Artifact to remove
name The name of the Artifact to remove
version The Version of the Artifact to remove
region The Region to remove the Artifact from
Returns:
true if this repository contained the specified Artifact
    boolean remove(String typeString nameVersion version, Region region);

    
Returns the entire collection of Artifacts contained within this repository. The returned collection should not be mutated by this repository when it changes. Only a subsequent call to this method will show changes to the contents of the repository.

Returns:
The entire collection of artifacts contained within this repository
    Set<ArtifactgetArtifacts();

    
Gets a specific Artifact from this repository.

Parameters:
type The type of the Artifact to get
name The name of the Artifact to get
version The Version of the Artifact to get
region The Region to get the Artifact from or null if the artifact has no region or the region isn't known
Returns:
The Artifact represented by this type, name, and version if it is in the repository, otherwise null
    Artifact getArtifact(String typeString nameVersion version, Region region);
New to GrepCode? Check out our FAQ X