001/* 002* file CcLockInfo.java 003* 004* Licensed Materials - Property of IBM 005* Restricted Materials of IBM 006* 007* com.ibm.rational.wvcm.stp.cc.CcLockInfo 008* 009* (C) Copyright IBM Corporation 2007, 2008. All Rights Reserved. 010* Note to U.S. Government Users Restricted Rights: Use, duplication or 011* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 012*/ 013 014package com.ibm.rational.wvcm.stp.cc; 015 016import java.util.Date; 017import java.util.List; 018 019 020/** 021 * Locks can be set on most Clearcase objects. CcLockInfo 022 * is an object that holds the properties that a lock 023 * can have. Note that two of the properties: LockedByUser 024 * and LockedOnDate, are set by Clearcase, so only getters 025 * are available in this interface. 026 */ 027public interface CcLockInfo { 028 029 /** 030 * Get the name of the user who set the lock. 031 * @return String containing the name of the locking user. 032 */ 033 public String getLockedByUser(); 034 035 /** 036 * Get list of excluded users. 037 * @return List of user names to whom the lock does not apply. 038 */ 039 public List<String> getExcludedUserList(); 040 041 /** 042 * Set the list of excluded users. 043 * If providing an excluded user list, obsolete may not be set <code>true</code>. 044 * @param nusers List of user names to whom the lock does not apply 045 */ 046 public void setExcludedUserList(List<String> nusers); 047 048 /** 049 * Get the description of the lock. This is not symmetric 050 * with the input to setLockDescription, because Clearcase 051 * adds its own information to the description. 052 * @return String containing the lock description. 053 */ 054 public String getLockDescription(); 055 056 /** 057 * Set the description of the lock. 058 * @param description Comment to be applied/displayed with the lock. 059 */ 060 public void setLockDescription(String description); 061 062 /** 063 * Get the date object was locked. 064 * @return Date the lock was applied. 065 */ 066 public Date getLockedOnDate(); 067 068 /** 069 * Check if this is an obsolete lock (should be hidden from most operations). 070 * @return <code>true</code> if the lock is obsolete, <code>false</code> otherwise 071 */ 072 public boolean getObsolete(); 073 074 /** 075 * Set the obsolete state of the lock. If not specified, default is <code>false</code>. 076 * If setting obsolete to <code>true</code>, an excluded user list may not be provided. 077 * @param obsolete <code>true</code> if the lock is obsolete, <code>false</code> otherwise 078 */ 079 public void setObsolete(boolean obsolete); 080 081}