org.sonatype.aether.repository
Class LocalMetadataRegistration

java.lang.Object
  extended by org.sonatype.aether.repository.LocalMetadataRegistration

public class LocalMetadataRegistration
extends java.lang.Object

A request to register metadata within the local repository.

See Also:
LocalRepositoryManager.add(RepositorySystemSession, LocalMetadataRegistration)

Constructor Summary
LocalMetadataRegistration()
          Creates an uninitialized registration.
LocalMetadataRegistration(Metadata metadata)
          Creates a registration request for the specified metadata accompanying a locally built artifact.
LocalMetadataRegistration(Metadata metadata, RemoteRepository repository, java.util.Collection<java.lang.String> contexts)
          Creates a registration request for the specified metadata.
 
Method Summary
 java.util.Collection<java.lang.String> getContexts()
          Gets the resolution contexts in which the metadata is available.
 Metadata getMetadata()
          Gets the metadata to register.
 RemoteRepository getRepository()
          Gets the remote repository from which the metadata was resolved.
 LocalMetadataRegistration setContexts(java.util.Collection<java.lang.String> contexts)
          Sets the resolution contexts in which the metadata is available.
 LocalMetadataRegistration setMetadata(Metadata metadata)
          Sets the metadata to register.
 LocalMetadataRegistration setRepository(RemoteRepository repository)
          Sets the remote repository from which the metadata was resolved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalMetadataRegistration

public LocalMetadataRegistration()
Creates an uninitialized registration.


LocalMetadataRegistration

public LocalMetadataRegistration(Metadata metadata)
Creates a registration request for the specified metadata accompanying a locally built artifact.

Parameters:
metadata - The metadata to register, may be null.

LocalMetadataRegistration

public LocalMetadataRegistration(Metadata metadata,
                                 RemoteRepository repository,
                                 java.util.Collection<java.lang.String> contexts)
Creates a registration request for the specified metadata.

Parameters:
metadata - The metadata to register, may be null.
repository - The remote repository from which the metadata was resolved or null if the metadata accompanies a locally built artifact.
contexts - The resolution contexts, may be null.
Method Detail

getMetadata

public Metadata getMetadata()
Gets the metadata to register.

Returns:
The metadata or null if not set.

setMetadata

public LocalMetadataRegistration setMetadata(Metadata metadata)
Sets the metadata to register.

Parameters:
metadata - The metadata, may be null.
Returns:
This request for chaining, never null.

getRepository

public RemoteRepository getRepository()
Gets the remote repository from which the metadata was resolved.

Returns:
The remote repositories or null if the metadata was locally built.

setRepository

public LocalMetadataRegistration setRepository(RemoteRepository repository)
Sets the remote repository from which the metadata was resolved.

Parameters:
repository - The remote repository or null if the metadata accompanies a locally built artifact.
Returns:
This request for chaining, never null.

getContexts

public java.util.Collection<java.lang.String> getContexts()
Gets the resolution contexts in which the metadata is available.

Returns:
The resolution contexts in which the metadata is available, never null.

setContexts

public LocalMetadataRegistration setContexts(java.util.Collection<java.lang.String> contexts)
Sets the resolution contexts in which the metadata is available.

Parameters:
contexts - The resolution contexts, may be null.
Returns:
This request for chaining, never null.


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.