SmartFrog 3.10.000

org.smartfrog.services.os.java
Class SerializedArtifact

java.lang.Object
  extended by org.smartfrog.services.os.java.SerializedArtifact
All Implemented Interfaces:
java.io.Serializable

public class SerializedArtifact
extends java.lang.Object
implements java.io.Serializable

Wire representation of an artifact. This is one way only: there is no way to create a LibraryArtifact from this, but we can create one with LibraryArtifact.createSerializedArtifact()

See Also:
Serialized Form

Field Summary
 java.lang.String artifact
          Artifact.
 java.lang.String classifier
          optional classifier
static java.lang.String ERROR_INVALID_LIBRARY
           
static java.lang.String ERROR_NO_LIBRARY_VERSION
           
static java.lang.String ERROR_NULL_ARTIFACT
           
 java.lang.String extension
          optional extension
 java.lang.String md5
          MD5 checksum
 java.lang.String project
          Project name
 java.lang.String sha1
          SHA1 checksum
 java.lang.String version
          Version.
 
Constructor Summary
SerializedArtifact()
           
 
Method Summary
static void assertValid(SerializedArtifact library, boolean versionNeeded)
          validity logic
 boolean isValid()
          Test for being valid.
 java.lang.String toString()
          Stringify, for debugging
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_NO_LIBRARY_VERSION

public static final java.lang.String ERROR_NO_LIBRARY_VERSION
See Also:
Constant Field Values

ERROR_INVALID_LIBRARY

public static final java.lang.String ERROR_INVALID_LIBRARY
See Also:
Constant Field Values

ERROR_NULL_ARTIFACT

public static final java.lang.String ERROR_NULL_ARTIFACT
See Also:
Constant Field Values

project

public java.lang.String project
Project name


artifact

public java.lang.String artifact
Artifact. Required


extension

public java.lang.String extension
optional extension


classifier

public java.lang.String classifier
optional classifier


version

public java.lang.String version
Version. Required by some policies


sha1

public java.lang.String sha1
SHA1 checksum


md5

public java.lang.String md5
MD5 checksum

Constructor Detail

SerializedArtifact

public SerializedArtifact()
Method Detail

isValid

public boolean isValid()
Test for being valid. Looks at project and artifact only

Returns:
true if we are valid

toString

public java.lang.String toString()
Stringify, for debugging

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

assertValid

public static void assertValid(SerializedArtifact library,
                               boolean versionNeeded)
                        throws SmartFrogRuntimeException
validity logic

Parameters:
library - library to check
versionNeeded - is the version attribute needed
Throws:
SmartFrogRuntimeException - if the library is null or invalid, or, if versionNeeded set, if there is no version

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP