de.smartics.properties.resource.domain
Class ArtifactRef

Package class diagram package ArtifactRef
java.lang.Object
  extended by de.smartics.properties.resource.domain.ArtifactRef
All Implemented Interfaces:
Serializable

@ThreadSafe
public final class ArtifactRef
     
     
extends Object
implements Serializable

An artifact identifier including a physical reference to an exemplar of the artifact.

See Also:
Serialized Form

Constructor Summary
ArtifactRef(ArtifactId id, URL url)
          Default constructor.
 
Method Summary
 ArtifactId getId()
          Returns the unique identifier of the artifact.
 URL getUrl()
          Returns the reference to the physical artifact.
 boolean isArchive()
          Checks if the referenced artifact is an archive.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArtifactRef

public ArtifactRef(ArtifactId id,
                   URL url)
            throws NullPointerException
Default constructor.

Parameters:
id - the unique identifier of the artifact.
url - the reference to the physical artifact.
Throws:
NullPointerException - if id or url is null.
Method Detail

getId

public ArtifactId getId()
Returns the unique identifier of the artifact.

Returns:
the unique identifier of the artifact. Never null.

getUrl

public URL getUrl()
Returns the reference to the physical artifact.

Returns:
the reference to the physical artifact. Never null.

isArchive

public boolean isArchive()
Checks if the referenced artifact is an archive.

Implementation Notes:
Currently only artifacts of type POM are not archives.
Returns:
true if the referenced artifact is an archive, false otherwise.

toString

public String toString()
Returns the string representation of the object.

Overrides:
toString in class Object
Returns:
the string representation of the object.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.