com.ibm.itim.dataservices.model.system
Class Delegate

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.system.Delegate
All Implemented Interfaces:
java.io.Serializable

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

Represents a period of delegation and the SystemUser acting as the delegate. Note that the Date object used to specify the start and end dates for the period of delegation should be set according to the timezone in which the Identity Manager server resides. For example, if the Identity Manager server resides in a timezone +5 hours past GMT, a Date object indicating January 4, 2006, 5:30pm in the server timezone can be created as follows: Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+5")); calendar.clear(); calender.set(Calendar.MONTH, Calendar.JANUARY); calendar.set(Calendar.DAY_OF_MONTH, 4); calendar.set(Calendar.YEAR, 2006); calendar.set(Calendar.HOUR_OF_DAY, 17); calendar.set(calendar.MINUTE, 30); Date date = calendar.getTime();

See Also:
Serialized Form

Constructor Summary
Delegate()
          Default constructor.
Delegate(DistinguishedName delegateDN, java.util.Date startDate, java.util.Date endDate)
          Constructs with the name of the delegate and the delegation period.
 
Method Summary
 boolean equals(Delegate delegate)
          Provides equality comparision.
 boolean equals(java.lang.Object obj)
          Provides equality comparision.
 DistinguishedName getDelegateDN()
          Returns the distinguished name of the delegate.
 java.util.Date getEndDate()
          Returns the date and time delegation ends (or ended) in a java.util.Date.
 java.util.Date getStartDate()
          Returns the date and time delegation begins (or began) in a java.util.Date.
 int hashCode()
          Returns hash code.
 void setEndDate(java.util.Date endDate)
          Sets the date and time delegation ends specified in a java.util.Date.
 void setStartDate(java.util.Date startDate)
          Sets the date and time delegation begins specified in a java.util.Date.
 java.lang.String toString()
          Returns Delegate fields in a formatted String of three tokens as in: eruid=APrice,ou=systemUser,ou=itim,ou=Root,dc=com$200202041821Z$200202041821Z Where token 1 is the systemUser DN (the delegate), token 2 is the start date (when delegation begins) and token 3 is the end date (end of delegation).
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Delegate

public Delegate()
Default constructor.


Delegate

public Delegate(DistinguishedName delegateDN,
                java.util.Date startDate,
                java.util.Date endDate)
Constructs with the name of the delegate and the delegation period.

Parameters:
delegateDN - DistinguishedName of the delegate SystemUser.
startDate - Begining date/time of the delegation.
endDate - End date/time of the delegation.
Method Detail

getDelegateDN

public DistinguishedName getDelegateDN()
Returns the distinguished name of the delegate.

Returns:
DistinguishedName of the delegate SystemUser.

getStartDate

public java.util.Date getStartDate()
Returns the date and time delegation begins (or began) in a java.util.Date.

Returns:
Date object holding date and time delegation begins.

setStartDate

public void setStartDate(java.util.Date startDate)
Sets the date and time delegation begins specified in a java.util.Date.

Parameters:
startDate - Date object holding date and time delegation begins.

getEndDate

public java.util.Date getEndDate()
Returns the date and time delegation ends (or ended) in a java.util.Date.

Returns:
Date object holding the date and time delegation ends.

setEndDate

public void setEndDate(java.util.Date endDate)
Sets the date and time delegation ends specified in a java.util.Date.

Parameters:
endDate - Date object holding the date and time delegation ends.

toString

public java.lang.String toString()
Returns Delegate fields in a formatted String of three tokens as in: eruid=APrice,ou=systemUser,ou=itim,ou=Root,dc=com$200202041821Z$200202041821Z Where token 1 is the systemUser DN (the delegate), token 2 is the start date (when delegation begins) and token 3 is the end date (end of delegation).

Overrides:
toString in class java.lang.Object
Returns:
Tokenized string as described above.

equals

public boolean equals(Delegate delegate)
Provides equality comparision.

Parameters:
delegate - Delegate to compare.
Returns:
true if equal, false if not.

equals

public boolean equals(java.lang.Object obj)
Provides equality comparision.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Delegate to compare.
Returns:
true if equal, false if not.

hashCode

public int hashCode()
Returns hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code.


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.