de.fhg.igd.semoa.starter
Class JceLibraryFile

java.lang.Object
  extended byjava.io.File
      extended byde.fhg.igd.semoa.starter.FileParameter
          extended byde.fhg.igd.semoa.starter.JceLibraryFile
All Implemented Interfaces:
Comparable, Parameter, Serializable

public class JceLibraryFile
extends FileParameter

This is a wrapper class for a JCE library file which is expected to be found either in the lib, respectively jre/lib directory or in the JCE backup directory of the currently used Java RE, as well as in the <semoa-base>/ext directory as the JCE Patch file provided by SeMoA.

Version:
"$Id: JceLibraryFile.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Matthias Pressfreund
See Also:
Serialized Form

Field Summary
protected static String ATTRIBUTE_TITLE_
          The implementation title attribute name in manifest file
protected static String ATTRIBUTE_VENDOR_
          The vendor attribute name in manifest file
protected static String ATTRIBUTE_VERSION_
          The version attribute name in manifest file
protected static String[] RECOMMENDED_VENDORS_
          Vendor definitions of recommended JCE libraries
static String REGULAR_NAME
          The default name of a JCE file which is expected to be found either in the lib or in the jre/lib directory of the currently used Java RE
static String SEMOA_NAME
          The name of the external SeMoA JCE patch file that is normally expected to be found in <semoa-base>/ext
protected  String title_
          The implemenation title
protected static String VALUE_UNKNOWN
          The output text for unknown attribute values
protected  String vendor_
          The vendor name
protected  String version_
          The version number
 
Fields inherited from class de.fhg.igd.semoa.starter.FileParameter
abbr_, SHORT_USER_DIR, SHORT_USER_HOME
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
protected JceLibraryFile(String file)
          Hidden construction.
 
Method Summary
static JceLibraryFile create(String file)
          Create a valid JceLibraryFile instance.
protected  String detectAttribute(String attr)
          Try to detect an attribute in the manifest of this JCE JAR library file.
protected  String detectTitle()
          Try to detect the implementation title of this JCE file.
protected  String detectVendor()
          Try to detect the vendor of this JCE file.
protected  String detectVersion()
          Try to detect the version of this JCE file.
 String getTitle()
           
 String getVendor()
           
 String getVersion()
           
protected  void init()
          After invoking FileParameter.init(), try to detect the vendor, the version and the title.
 boolean isRecommended()
          Check if the library is recommended for SeMoA.
protected  boolean isValid()
          Check for a manifest file.
 
Methods inherited from class de.fhg.igd.semoa.starter.FileParameter
isFlawed, normalize, toFull, toFullString, toShort, toShortString, toString
 
Methods inherited from class java.io.File
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REGULAR_NAME

public static final String REGULAR_NAME
The default name of a JCE file which is expected to be found either in the lib or in the jre/lib directory of the currently used Java RE

See Also:
Constant Field Values

SEMOA_NAME

public static final String SEMOA_NAME
The name of the external SeMoA JCE patch file that is normally expected to be found in <semoa-base>/ext

See Also:
Constant Field Values

RECOMMENDED_VENDORS_

protected static final String[] RECOMMENDED_VENDORS_
Vendor definitions of recommended JCE libraries


ATTRIBUTE_VENDOR_

protected static final String ATTRIBUTE_VENDOR_
The vendor attribute name in manifest file

See Also:
Constant Field Values

ATTRIBUTE_VERSION_

protected static final String ATTRIBUTE_VERSION_
The version attribute name in manifest file

See Also:
Constant Field Values

ATTRIBUTE_TITLE_

protected static final String ATTRIBUTE_TITLE_
The implementation title attribute name in manifest file

See Also:
Constant Field Values

VALUE_UNKNOWN

protected static final String VALUE_UNKNOWN
The output text for unknown attribute values

See Also:
Constant Field Values

vendor_

protected String vendor_
The vendor name


version_

protected String version_
The version number


title_

protected String title_
The implemenation title

Constructor Detail

JceLibraryFile

protected JceLibraryFile(String file)
Hidden construction. Usage of create(java.lang.String) is intended for object creation.

Parameters:
file - The original file
Method Detail

init

protected void init()
After invoking FileParameter.init(), try to detect the vendor, the version and the title.

Overrides:
init in class FileParameter

create

public static JceLibraryFile create(String file)
Create a valid JceLibraryFile instance.

Parameters:
file - The original file
Returns:
A valid JceLibraryFile

detectVendor

protected String detectVendor()
Try to detect the vendor of this JCE file.

Returns:
The attribute value or an identifier for an unknown value if it could not be detected

detectVersion

protected String detectVersion()
Try to detect the version of this JCE file.

Returns:
The attribute value or an identifier for an unknown value if it could not be detected

detectTitle

protected String detectTitle()
Try to detect the implementation title of this JCE file.

Returns:
The attribute value or an identifier for an unknown value if it could not be detected

detectAttribute

protected String detectAttribute(String attr)
Try to detect an attribute in the manifest of this JCE JAR library file.

Parameters:
attr - The attribute to find
Returns:
The attribute value or an identifier for an unknown value if it could not be detected

isValid

protected boolean isValid()
Check for a manifest file.

Specified by:
isValid in class FileParameter
Returns:
true if this is a valid JceLibraryFile

isRecommended

public boolean isRecommended()
Check if the library is recommended for SeMoA.

Returns:
true if the vendor can be found in RECOMMENDED_VENDORS_

getVendor

public String getVendor()

getVersion

public String getVersion()

getTitle

public String getTitle()


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.