com.ibm.tws.objects.model
Class WindowsUser

java.lang.Object
  extended bycom.ibm.tws.objects.model.WindowsUser
All Implemented Interfaces:
java.io.Serializable, TWSHeader, TWSObject

public class WindowsUser
extends java.lang.Object
implements TWSObject, TWSHeader

This class maintains information about Windows users. Since it has no header, it wraps directly a WindowsUserKey object, which in turn references a FlowTargetKey as part of the Windows user key.

The following syntax validation constraints must be met on WindowsUser objects:

name Always required
Blank spaces not allowed
Not longer than 47 characters (15 for domain, 31 for user)
workstationKey Must reference an existing workstation
password Not longer than 31 bytes
Null if current password must not be changed

Also notice that Windows users defined on non-Windows workstations are ignored at job execution time.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
WindowsUser()
          Creates an empty WindowsUser.
WindowsUser(Identifier windowsUserId)
          Creates a WindowsUser with the specified identifier.
WindowsUser(Identifier windowsUserId, WindowsUserKey windowsUserKey)
          Creates a WindowsUser with the specified identifier and key.
WindowsUser(WindowsUserKey windowsUserKey)
          Creates a WindowsUser with the specified key.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this WindowsUser object are equal to those of the given one.
 Identifier getId()
          Returns the windows user identifier.
 WindowsUserKey getKey()
          Returns the WindowsUserKey wrapped by this WindowsUser object.
 LockData getLockData()
          Returns the windows user lock data.
 ModifyData getModifyData()
          Returns the windows user modification data.
 java.lang.String getName()
          Returns the windows user name.
 TWSHeader getObjectHeader()
          Returns this object, which also acts as a TWS header.
 TWSKey getObjectKey()
          Returns the windows user key as a TWS key.
 byte[] getPassword()
          Returns the windows user password.
 Identifier getWorkstationId()
          Returns the identifier of the workstation referenced by this windows user.
 FlowTargetKey getWorkstationKey()
          Returns the key of the workstation referenced by this windows user.
 int hashCode()
          Returns a hash code for this WindowsUser object.
 boolean isPasswordEncrypted()
          Returns true if the current windows user password is encrypted.
 void setId(Identifier identifier)
          Sets the windows user identifier.
 void setKey(WindowsUserKey windowsUserKey)
          Sets the WindowsUserKey to be wrapped by this WindowsUser object.
 void setLockData(LockData data)
          Sets the windows user lock data.
 void setModifyData(ModifyData data)
          Sets the windows user modification data.
 void setName(java.lang.String value)
          Sets the windows user name.
 void setPassword(byte[] value)
          Sets the windows user password.
 void setPassword(byte[] value, boolean isEncrypted)
          Sets the windows user password.
 void setWorkstationId(Identifier identifier)
          Sets the identifier of the workstation referenced by this windows user.
 void setWorkstationKey(FlowTargetKey wksKey)
          Sets the key of the workstation referenced by this windows user.
 java.lang.String toString()
          Returns a string representation of this WindowsUser object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.

Constructor Detail

WindowsUser

public WindowsUser()
Creates an empty WindowsUser.


WindowsUser

public WindowsUser(Identifier windowsUserId)
Creates a WindowsUser with the specified identifier.

Parameters:
windowsUserId - The windows user identifier.

WindowsUser

public WindowsUser(WindowsUserKey windowsUserKey)
Creates a WindowsUser with the specified key.

Parameters:
windowsUserKey - The windows user key.

WindowsUser

public WindowsUser(Identifier windowsUserId,
                   WindowsUserKey windowsUserKey)
Creates a WindowsUser with the specified identifier and key.

Parameters:
windowsUserId - The windows user identifier.
windowsUserKey - The windows user key.
Method Detail

getId

public Identifier getId()
Returns the windows user identifier.

Specified by:
getId in interface TWSObject
Returns:
The windows user identifier.

getObjectKey

public TWSKey getObjectKey()
Returns the windows user key as a TWS key.

Specified by:
getObjectKey in interface TWSObject
Returns:
The windows user key as a TWS key.

getObjectHeader

public TWSHeader getObjectHeader()
Returns this object, which also acts as a TWS header.

Specified by:
getObjectHeader in interface TWSObject
Returns:
This object, which also acts as a TWS header.

getKey

public WindowsUserKey getKey()
Returns the WindowsUserKey wrapped by this WindowsUser object.

Returns:
The WindowsUserKey wrapped by this WindowsUser object.

getName

public java.lang.String getName()
Returns the windows user name.

Specified by:
getName in interface TWSObject
Returns:
The windows user name.

getWorkstationKey

public FlowTargetKey getWorkstationKey()
Returns the key of the workstation referenced by this windows user.

Returns:
The key of the workstation referenced by this windows user.

getPassword

public byte[] getPassword()
Returns the windows user password.

Returns:
the windows user password.

isPasswordEncrypted

public boolean isPasswordEncrypted()
Returns true if the current windows user password is encrypted. For internal use only.

Returns:
True if the current windows user password is encrypted.

getWorkstationId

public Identifier getWorkstationId()
Returns the identifier of the workstation referenced by this windows user.

Returns:
The identifier of the workstation referenced by this windows user.

getModifyData

public ModifyData getModifyData()
Returns the windows user modification data.

Specified by:
getModifyData in interface TWSObject
Returns:
The windows user modification data.

getLockData

public LockData getLockData()
Returns the windows user lock data.

Specified by:
getLockData in interface TWSObject
Returns:
The windows user lock data.

setId

public void setId(Identifier identifier)
Sets the windows user identifier.

Parameters:
identifier - The windows user identifier.

setKey

public void setKey(WindowsUserKey windowsUserKey)
Sets the WindowsUserKey to be wrapped by this WindowsUser object.

Parameters:
windowsUserKey - The WindowsUserKey to be wrapped by this WindowsUser object.

setName

public void setName(java.lang.String value)
Sets the windows user name.

Parameters:
value - The windows user name.

setWorkstationKey

public void setWorkstationKey(FlowTargetKey wksKey)
Sets the key of the workstation referenced by this windows user.

Parameters:
wksKey - The key of the workstation referenced by this windows user.

setPassword

public void setPassword(byte[] value)
Sets the windows user password.

Parameters:
value - The windows user password (not encrypted).

setPassword

public void setPassword(byte[] value,
                        boolean isEncrypted)
Sets the windows user password. For internal use only.

Parameters:
value - The windows user password.
isEncrypted - True if the specified password is encrypted.

setWorkstationId

public void setWorkstationId(Identifier identifier)
Sets the identifier of the workstation referenced by this windows user.

Parameters:
identifier - The identifier of the workstation referenced by this windows user.

setModifyData

public void setModifyData(ModifyData data)
Sets the windows user modification data. For internal use only.

Parameters:
data - A ModifyData object.

setLockData

public void setLockData(LockData data)
Sets the windows user lock data. For internal use only.

Parameters:
data - A LockData object.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this WindowsUser object are equal to those of the given one.

Parameters:
object - The object to be compared with this one.
Returns:
True if this object equals to the given one.

hashCode

public int hashCode()
Returns a hash code for this WindowsUser object.

Returns:
The object's hash code.

toString

public java.lang.String toString()
Returns a string representation of this WindowsUser object.

Returns:
A text string including all WindowsUser fields.


Copyright © 2005 IBM All Rights Reserved.