001: /*
002: * ====================================================================
003: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
004: *
005: * This software is licensed as described in the file COPYING, which
006: * you should have received as part of this distribution. The terms
007: * are also available at http://svnkit.com/license.html
008: * If newer versions of this license are posted there, you may use a
009: * newer version instead, at your option.
010: * ====================================================================
011: */
012:
013: package org.tmatesoft.svn.core;
014:
015: import java.util.Collection;
016: import java.util.HashSet;
017:
018: /**
019: * The <b>SVNRevisionProperty</b> class represents revision properties - those
020: * unversioned properties supported by Subversion.
021: *
022: * <p>
023: * Revision properties are unversioned, so there is always a risk to
024: * lose information when modifying revision property values.
025: *
026: * @version 1.1.1
027: * @author TMate Software Ltd.
028: */
029: public class SVNRevisionProperty {
030:
031: private static final Collection REVISION_PROPS = new HashSet();
032:
033: static {
034: REVISION_PROPS.add(SVNRevisionProperty.AUTHOR);
035: REVISION_PROPS.add(SVNRevisionProperty.LOG);
036: REVISION_PROPS.add(SVNRevisionProperty.DATE);
037: REVISION_PROPS.add(SVNRevisionProperty.ORIGINAL_DATE);
038: REVISION_PROPS.add(SVNRevisionProperty.AUTOVERSIONED);
039: }
040:
041: /**
042: * Says if the given revision property name is really a valid
043: * revision property name.
044: *
045: * @param name a property name
046: * @return <span class="javakeyword">true</span> if it's a
047: * revision property name, <span class="javakeyword">false</span>
048: * otherwise
049: */
050: public static boolean isRevisionProperty(String name) {
051: return name != null && REVISION_PROPS.contains(name);
052: }
053:
054: /**
055: * An <span class="javastring">"svn:author"</span> revision
056: * property (that holds the name of the revision's author).
057: */
058: public static final String AUTHOR = "svn:author";
059: /**
060: * An <span class="javastring">"svn:log"</span> revision property -
061: * the one that stores a log message attached to a revision
062: * during a commit operation.
063: */
064: public static final String LOG = "svn:log";
065: /**
066: * An <span class="javastring">"svn:date"</span> revision property
067: * that is a date & time stamp representing the time when the
068: * revision was created.
069: */
070: public static final String DATE = "svn:date";
071:
072: /**
073: * <span class="javastring">"svn:sync-lock"</span> revision property.
074: * @since 1.1, new in Subversion 1.4
075: */
076: public static final String LOCK = "svn:sync-lock";
077:
078: /**
079: * <span class="javastring">"svn:sync-from-url"</span> revision property.
080: * @since 1.1, new in Subversion 1.4
081: */
082: public static final String FROM_URL = "svn:sync-from-url";
083:
084: /**
085: * <span class="javastring">"svn:sync-from-uuid"</span> revision property.
086: * @since 1.1, new in Subversion 1.4
087: */
088: public static final String FROM_UUID = "svn:sync-from-uuid";
089:
090: /**
091: * <span class="javastring">"svn:sync-last-merged-rev"</span> revision property.
092: * @since 1.1, new in Subversion 1.4
093: */
094: public static final String LAST_MERGED_REVISION = "svn:sync-last-merged-rev";
095:
096: /**
097: * <span class="javastring">"svn:sync-currently-copying"</span> revision property.
098: * @since 1.1, new in Subversion 1.4
099: */
100: public static final String CURRENTLY_COPYING = "svn:sync-currently-copying";
101:
102: public static final String AUTOVERSIONED = "svn:autoversioned";
103:
104: public static final String ORIGINAL_DATE = "svn:original-date";
105: }
|