com.ibm.datapower.wamt
Class ModelType

java.lang.Object
  extended by com.ibm.datapower.wamt.ModelType

public class ModelType
extends java.lang.Object

This class provides a set of enumerated values for the model type, as opposed to using String values. You should use the public fields and the methods included here.

The model describes the hardware version of the appliance. Also be aware that there may be more ModelTypes than the enums listed here, as this class supports creation of ModelTypes not known apriori. The enums are here only as a convenience. Be sure to use the #equals(ModelType) method and not the == operator when comparing for equality.

The descriptions in this class were NOT NLS enabled, because they are unlikely to ever be internationalized. The descriptions are copied directly from the device metadata, see Commands.getDeviceMetaInfo(com.ibm.datapower.wamt.amp.DeviceContext).

See Also:
ModelTypeIncompatibilityException

Field Summary
static java.lang.String COPYRIGHT_2009_2013
           
static ModelType TYPE_4195
          A model that is 4195
static ModelType TYPE_5725
          A model that is a virtual appliance that will specifically run on VMWare
static ModelType TYPE_7198
          A model that is a 7198.
static ModelType TYPE_7199
          A model that is a 7199.
static ModelType TYPE_9001
          A model that is a 9001.
static ModelType TYPE_9002
          A model that is a 9002.
static ModelType TYPE_9003
          A model that is a 9003.
static ModelType TYPE_9005
          A special model type used ONLY for firmware that indicates the firmware supports a 7198 or 7199.
static ModelType TYPE_9235
          A model that is a 9235.
static ModelType TYPE_OTHER
          A special model type used ONLY for firmware that indicates the firmware supports a 9001 or 9002.
static ModelType TYPE_Virtual
          A model that is a generic virtual appliance that will run on any hypervisor
 
Constructor Summary
ModelType(java.lang.String description)
          Create a new ModelType object.
 
Method Summary
 boolean equals(java.lang.Object that)
          Compare two ModelType objects to see if they are equal.
static ModelType fromString(java.lang.String modelTypeString)
          Get a ModelType instance based on the String representation of the instance returned by getDisplayName
 java.lang.String getDisplayName()
          Get a String description of this object that is suitable for display to an end user.
 int hashCode()
           
 boolean isCompatibleWith(ModelType that)
          Check if two ModelType objects are compatible with each other.
 java.lang.String toString()
          Get a human-readable String representation of this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT_2009_2013

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

TYPE_9001

public static final ModelType TYPE_9001
A model that is a 9001.


TYPE_9002

public static final ModelType TYPE_9002
A model that is a 9002.


TYPE_9003

public static final ModelType TYPE_9003
A model that is a 9003.


TYPE_9235

public static final ModelType TYPE_9235
A model that is a 9235.


TYPE_7198

public static final ModelType TYPE_7198
A model that is a 7198.


TYPE_7199

public static final ModelType TYPE_7199
A model that is a 7199.


TYPE_9005

public static final ModelType TYPE_9005
A special model type used ONLY for firmware that indicates the firmware supports a 7198 or 7199. Firmware appears to be binary compatible across the 7198 or 7199.


TYPE_OTHER

public static final ModelType TYPE_OTHER
A special model type used ONLY for firmware that indicates the firmware supports a 9001 or 9002. Firmware appears to be binary compatible across the 9001 and 9002.


TYPE_5725

public static final ModelType TYPE_5725
A model that is a virtual appliance that will specifically run on VMWare


TYPE_Virtual

public static final ModelType TYPE_Virtual
A model that is a generic virtual appliance that will run on any hypervisor


TYPE_4195

public static final ModelType TYPE_4195
A model that is 4195

Constructor Detail

ModelType

public ModelType(java.lang.String description)
Create a new ModelType object. The use of fromString(String) is preferred, because it will attempt to reuse objects for known Strings.

Parameters:
description - the text identifier of the model type, such as "9003".
Method Detail

equals

public boolean equals(java.lang.Object that)
Compare two ModelType objects to see if they are equal. In the context of this method, "equal" means exactly the same. Even though a 9235 is compatible with a 9003, it is not equal. If you want to check for compatibility instead of being exactly the same, then you should use isCompatibleWith(ModelType).

Overrides:
equals in class java.lang.Object
Parameters:
that - the other ModelType object to compare to this.
Returns:
true if the objects are equivalent, false otherwise
See Also:
isCompatibleWith(ModelType)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isCompatibleWith

public boolean isCompatibleWith(ModelType that)
Check if two ModelType objects are compatible with each other. This is used to check if the firmware ModelType can be deployed to this Device.

For the most part, "compatible" means #equals(ModelType). However, a 9003 is not equal to a 9235, but they are compatible.

Parameters:
that - other ModelType object to compare to this.
Returns:
true if the objects are compatible with each other, false otherwise
See Also:
#equals(ModelType)

toString

public java.lang.String toString()
Get a human-readable String representation of this object. This is more for debugging than for end-user consumption.

Overrides:
toString in class java.lang.Object
Returns:
a human-readable String representation of this object
See Also:
getDisplayName()

getDisplayName

public java.lang.String getDisplayName()
Get a String description of this object that is suitable for display to an end user.

This was NOT NLS enabled because the ModelType descriptions are constants

Returns:
a String description of this object that is suitable for display to an end user.
See Also:
toString()

fromString

public static ModelType fromString(java.lang.String modelTypeString)
Get a ModelType instance based on the String representation of the instance returned by getDisplayName

Parameters:
modelTypeString - A String previously returned by ModelType.getDisplayName()
Returns:
An instance of ModelType that would return the value ModelTypeString if getDisplayName was called on it. null will be returned if a matching instance can't be found.


© Copyright IBM Corp. 2006, 2010 All Rights Reserved.