Methods Summary |
---|
public java.lang.Object | clone()Clone this object.
try {
return new RoleUnresolved(roleName, roleValue, problemType);
} catch (IllegalArgumentException exc) {
return null; // :)
}
|
public int | getProblemType()Retrieves problem type.
return problemType;
|
public java.lang.String | getRoleName()Retrieves role name.
return roleName;
|
public java.util.List | getRoleValue()Retrieves role value.
return roleValue;
|
private void | readObject(java.io.ObjectInputStream in)Deserializes a {@link RoleUnresolved} from an {@link ObjectInputStream}.
if (compat)
{
// Read an object serialized in the old serial form
//
ObjectInputStream.GetField fields = in.readFields();
roleName = (String) fields.get("myRoleName", null);
if (fields.defaulted("myRoleName"))
{
throw new NullPointerException("myRoleName");
}
roleValue = (List) fields.get("myRoleValue", null);
if (fields.defaulted("myRoleValue"))
{
throw new NullPointerException("myRoleValue");
}
problemType = fields.get("myPbType", (int)0);
if (fields.defaulted("myPbType"))
{
throw new NullPointerException("myPbType");
}
}
else
{
// Read an object serialized in the new serial form
//
in.defaultReadObject();
}
|
public void | setProblemType(int thePbType)Sets problem type.
if (!(RoleStatus.isRoleStatus(thePbType))) {
// Revisit [cebro] Localize message
String excMsg = "Incorrect problem type.";
throw new IllegalArgumentException(excMsg);
}
problemType = thePbType;
return;
|
public void | setRoleName(java.lang.String theRoleName)Sets role name.
if (theRoleName == null) {
// Revisit [cebro] Localize message
String excMsg = "Invalid parameter.";
throw new IllegalArgumentException(excMsg);
}
roleName = theRoleName;
return;
|
public void | setRoleValue(java.util.List theRoleValue)Sets role value.
if (theRoleValue != null) {
roleValue = new ArrayList(theRoleValue);
} else {
roleValue = null;
}
return;
|
public java.lang.String | toString()Return a string describing this object.
StringBuffer result = new StringBuffer();
result.append("role name: " + roleName);
if (roleValue != null) {
result.append("; value: ");
for (Iterator objNameIter = roleValue.iterator();
objNameIter.hasNext();) {
ObjectName currObjName = (ObjectName)(objNameIter.next());
result.append(currObjName.toString());
if (objNameIter.hasNext()) {
result.append(", ");
}
}
}
result.append("; problem type: " + problemType);
return result.toString();
|
private void | writeObject(java.io.ObjectOutputStream out)Serializes a {@link RoleUnresolved} to an {@link ObjectOutputStream}.
if (compat)
{
// Serializes this instance in the old serial form
//
ObjectOutputStream.PutField fields = out.putFields();
fields.put("myRoleName", roleName);
fields.put("myRoleValue", (ArrayList)roleValue);
fields.put("myPbType", problemType);
out.writeFields();
}
else
{
// Serializes this instance in the new serial form
//
out.defaultWriteObject();
}
|