001/*
002 * file CqReplica.java
003 *
004 * Licensed Materials - Property of IBM
005 * Restricted Materials of IBM 
006 *
007 * com.ibm.rational.wvcm.stp.cq.CqReplica
008 *
009 * (C) Copyright IBM Corporation 2004, 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.cq;
015
016import static com.ibm.rational.wvcm.stpex.StpExBase.PROPERTY_NAMESPACE;
017
018import javax.wvcm.WvcmException;
019import javax.wvcm.PropertyNameList.PropertyName;
020
021import com.ibm.rational.wvcm.stp.StpResource;
022
023
024/**
025 * A proxy interface for a ClearQuest replica. Proxies of this type are returned
026 * by the CqDb.LOCAL_REPLICA property and the CQ_MASTER_REPLICA property of
027 * CqGroup, CQUser, CqQueryFolderItem, and CqRecord. A database has mastership
028 * of a resource if it's LOCAL_REPLICA property matches the CQ_MASTER_REPLICA of
029 * the resource. Setting the CQ_MASTER_REPLICA property of a resource to a new
030 * CqReplica value will change the mastership of that resource to that replica.
031 * A list of possible replica names is returned by the CHOICE_LIST property of
032 * the system-owned field named "ratl_mastership"
033 * <p>
034 * The user-friendly specification for the location of a replica has the form
035 * 
036 * <pre>
037 *  <b>cq.replica:</b><i>&lt;replica-name&gt;</i>@<i>&lt;db-set&gt;</i>
038 * </pre>
039 */
040public interface CqReplica extends CqResource
041{
042    /** The database set that contains this replica */
043    PropertyName<CqDbSet> DB_SET =
044        new PropertyName<CqDbSet>(PROPERTY_NAMESPACE, "db-set");
045
046    /**
047     * Returns the value of the {@link #DB_SET DB_SET} property as defined by
048     * this proxy.
049     * 
050     * @return A CqDbSet proxy for the database set that contains this replica.
051     * 
052     * @throws WvcmException if this proxy does not define a value for the
053     *             {@link #DB_SET DB_SET} property.
054     */
055    CqDbSet getDbSet() throws WvcmException;
056}