public class Version extends UCMEntity implements Comparable<Version>
Modifier and Type | Class and Description |
---|---|
static class |
Version.Status |
UCMEntity.Kind, UCMEntity.LabelStatus
date, dateFormatter, fqname, kind, labelStatus, loaded, mastership, pattern_std_fqname, pattern_tag_fqname, pattern_version_fqname, pvob, rx_ccdef_allowed, rx_ccdef_cc_name, rx_ccdef_filename, rx_ccdef_vob, shortname, user, vob
rx_attr_find
Modifier and Type | Method and Description |
---|---|
static void |
addToSourceControl(File file,
boolean mkdir,
File view) |
static void |
addToSourceControl(File file,
File viewContext,
String comment,
boolean checkIn)
Add a
File in ClearCase |
String |
blame() |
void |
checkIn() |
void |
checkIn(boolean identical) |
static void |
checkIn(File file,
boolean identical,
File viewContext) |
static void |
checkIn(File file,
boolean identical,
File viewContext,
String comment) |
void |
checkInIdentical() |
void |
checkOut() |
static void |
checkOut(File file,
File context) |
static void |
checkOut(File file,
File context,
String comment) |
int |
compareTo(Version other) |
static Version |
create(File file,
boolean mkdir,
SnapshotView view) |
static Version |
create(File file,
File viewContext)
Create a ClearCase element from a File, that will be checked in
|
static Version |
get(String name) |
Activity |
getActivity() |
static Activity |
getActivity(Version version)
|
static List<Activity> |
getBaselineDiff(Diffable d1,
Diffable d2,
boolean merge,
File viewContext)
ONLY USED IN TEST
|
static List<Activity> |
getBaselineDiff(Diffable d1,
Diffable d2,
boolean merge,
File viewContext,
boolean versions)
ONLY USED IN TEST
Activity based baseline diff method
|
String |
getBranch()
Get the fully qualified branch name.
|
List<Branch> |
getBranches() |
static List<Branch> |
getBranches(String branchSpecifier) |
static ChangeSet2 |
getChangeset(Diffable e1,
Diffable e2,
boolean merge,
File viewContext) |
String |
getElementObjectId() |
File |
getFile() |
String |
getQualifiedFilename()
Get the qualified filename, without any branch and version syntax.
|
Integer |
getRevision() |
String |
getSFile() |
Version.Status |
getStatus() |
Branch |
getUltimateBranch() |
static List<File> |
getUncheckedIn(File viewContext) |
static Version |
getUnextendedVersion(File file,
File viewroot)
|
String |
getVersion() |
static Version |
getVersion(String version) |
File |
getView() |
boolean |
hijack() |
protected void |
initialize()
initialise the UCM entity.
|
static boolean |
isCheckedout(File element,
File viewContext)
An exception safe way to determine whether the file is checked out
|
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isMoved() |
static boolean |
isUnderSourceControl(File element,
File viewContext)
An exception safe way to determine whether the file is under
source control
|
Version |
load()
Default load functionality for the entity.
|
static void |
makeDirectory(File directory,
File view,
String comment)
Make a directory in ClearCase
|
static void |
makeElement(File file,
File view,
String comment)
Make an element in ClearCase
|
void |
moveFile(File destination) |
static void |
moveFile(File file,
File destination,
File context) |
static void |
printCheckouts(File viewContext) |
static void |
recursiveCheckin(File path) |
void |
removeName() |
static void |
removeName(File file,
File context) |
void |
removeVersion() |
static void |
removeVersion(File file,
File viewContext)
Remove a
Version in ClearCase |
void |
setActivity(Activity activity) |
void |
setFile(File file) |
void |
setOldFile(File oldFile) |
void |
setSFile(String sfile) |
void |
setStatus(Version.Status status) |
void |
setView(File view) |
void |
setView(SnapshotView view) |
String |
stringify()
Returns a string representation of the entity object
|
void |
uncheckout() |
void |
uncheckout(boolean keep) |
static void |
uncheckout(File file,
boolean keep,
File viewContext) |
autoLoad, changeOwnership, changeOwnership, equals, getargComment, getargIn, getComment, getDate, getEntity, getEntity, getEntitySelector, getFqname, getFullyQualifiedName, getHyperlinks, getKind, getLabelStatus, getLabelStatusFromString, getMastership, getNamePart, getNormalizedName, getObjectId, getObjectId, getPVob, getShortname, getTag, getUser, hashCode, isCreated, isLoaded, loadDate, setComment, setCreated, setDate, setDate, setFqname, setKind, setLabelStatusFromString, setMastership, setUser, toString
createSimpleAttributeType, getAttribute, getAttributes, getAttributes, getAttributes, setAttribute, setAttribute
protected void initialize()
UCMEntity
PVob
.initialize
in class UCMEntity
public String getQualifiedFilename()
public Branch getUltimateBranch()
public boolean hijack()
public static Version getUnextendedVersion(File file, File viewroot) throws IOException, CleartoolException, UnableToLoadEntityException, UCMEntityNotFoundException, UnableToInitializeEntityException
file
- The file to get the version fromviewroot
- The view rootVersion
IOException
- Thrown on file/io errorsCleartoolException
- Thrown on ClearCase errorUnableToLoadEntityException
- Thrown on ClearCase errorUCMEntityNotFoundException
- Thrown on ClearCase errorUnableToInitializeEntityException
- Thrown on ClearCase errorpublic String blame() throws UCMEntityNotFoundException, UnableToCreateEntityException, UnableToGetEntityException, UnableToLoadEntityException
public String getVersion() throws UnableToLoadEntityException
UnableToLoadEntityException
public String getBranch()
public Version load() throws UnableToLoadEntityException
UCMEntity
load
in class UCMEntity
UCMEntity
UnableToLoadEntityException
- Thrown when ClearCase reports errorspublic static Activity getActivity(Version version) throws CleartoolException, UnableToInitializeEntityException
Activity
for a Version
.
In base ClearCase the Activity
object does not exist, it must therefore be allowed to return null. See FB case 9988.version
- VersionActivity
CleartoolException
- Thrown on ClearCase errorUnableToInitializeEntityException
- Thrown on ClearCase errorpublic Activity getActivity()
public void setActivity(Activity activity)
public static Version create(File file, boolean mkdir, SnapshotView view) throws CleartoolException, IOException, UnableToCreateEntityException, UCMEntityNotFoundException, UnableToGetEntityException, UnableToLoadEntityException, UnableToInitializeEntityException
public static Version create(File file, File viewContext) throws ClearCaseException, IOException
file
- - The relative fileviewContext
- - The view rootVersion
ClearCaseException
- Thrown on ClearCase errorIOException
- Thrown when the file does not exits, cannot be created or other non-clearcase related errorpublic static void makeElement(File file, File view, String comment) throws CleartoolException
file
- Fileview
- Current viewcomment
- CommentCleartoolException
- Thrown on ClearCase errorpublic static void makeDirectory(File directory, File view, String comment) throws CleartoolException
directory
- The directory to makeview
- The current viewcomment
- CommentCleartoolException
- Thrown on ClearCase errorpublic static void addToSourceControl(File file, File viewContext, String comment, boolean checkIn) throws CleartoolException
File
in ClearCasefile
- FileviewContext
- Current viewcomment
- Check in commentcheckIn
- Check in new elementCleartoolException
- Thrown on ClearCase errorpublic static void addToSourceControl(File file, boolean mkdir, File view) throws CleartoolException
CleartoolException
public void checkIn() throws CleartoolException
CleartoolException
public static void checkIn(File file, boolean identical, File viewContext) throws CleartoolException
CleartoolException
public static void checkIn(File file, boolean identical, File viewContext, String comment) throws CleartoolException
CleartoolException
public void checkIn(boolean identical) throws CleartoolException
CleartoolException
public void checkInIdentical() throws CleartoolException
CleartoolException
public void checkOut() throws CleartoolException
CleartoolException
public static void checkOut(File file, File context) throws CleartoolException
CleartoolException
public static void checkOut(File file, File context, String comment) throws CleartoolException
CleartoolException
public void removeVersion() throws CleartoolException
CleartoolException
public static void removeVersion(File file, File viewContext) throws CleartoolException
Version
in ClearCasefile
- The file to remove a version fromviewContext
- Current working viewCleartoolException
- Thrown on ClearCase errorpublic void removeName() throws CleartoolException
CleartoolException
public static void removeName(File file, File context) throws CleartoolException
CleartoolException
public static void moveFile(File file, File destination, File context) throws CleartoolException
CleartoolException
public void moveFile(File destination) throws CleartoolException
CleartoolException
public void uncheckout() throws CleartoolException
CleartoolException
public void uncheckout(boolean keep) throws CleartoolException
CleartoolException
public static void uncheckout(File file, boolean keep, File viewContext) throws CleartoolException
CleartoolException
public static void recursiveCheckin(File path) throws CleartoolException
CleartoolException
public void setView(SnapshotView view)
public void setView(File view)
public File getView()
public void setSFile(String sfile)
public String getSFile()
public void setFile(File file)
public File getFile()
public void setStatus(Version.Status status)
public Version.Status getStatus()
public Integer getRevision()
public static List<File> getUncheckedIn(File viewContext) throws CleartoolException
CleartoolException
public boolean isDirectory() throws UnableToLoadEntityException
UnableToLoadEntityException
public boolean isFile() throws UnableToLoadEntityException
UnableToLoadEntityException
public static boolean isUnderSourceControl(File element, File viewContext) throws CleartoolException
element
- The File to be checkedviewContext
- The view context as a File pathCleartoolException
- Thrown on ClearCase errorpublic static boolean isCheckedout(File element, File viewContext) throws CleartoolException
element
- The File to be checkedviewContext
- The view context as a File pathCleartoolException
- Thrown on ClearCase errorpublic void setOldFile(File oldFile)
public boolean isMoved()
public String stringify()
UCMEntity
public static ChangeSet2 getChangeset(Diffable e1, Diffable e2, boolean merge, File viewContext) throws CleartoolException, UnableToInitializeEntityException
public static List<Activity> getBaselineDiff(Diffable d1, Diffable d2, boolean merge, File viewContext) throws CleartoolException, UnableToLoadEntityException, UCMEntityNotFoundException, UnableToInitializeEntityException
d1
- d1d2
- d2merge
- mergeviewContext
- viewContextCleartoolException
- Thrown on ClearCase errorUnableToLoadEntityException
- Thrown on ClearCase errorUCMEntityNotFoundException
- Thrown on ClearCase errorUnableToInitializeEntityException
- Thrown on ClearCase errorpublic static List<Activity> getBaselineDiff(Diffable d1, Diffable d2, boolean merge, File viewContext, boolean versions) throws CleartoolException, UnableToLoadEntityException, UCMEntityNotFoundException, UnableToInitializeEntityException
d1
- d1d2
- d2merge
- mergeviewContext
- viewContextversions
- versionCleartoolException
- Thrown on ClearCase errorUnableToLoadEntityException
- Thrown on ClearCase errorUCMEntityNotFoundException
- Thrown on ClearCase errorUnableToInitializeEntityException
- Thrown on ClearCase errorpublic int compareTo(Version other)
compareTo
in interface Comparable<Version>
public static Version get(String name) throws UnableToInitializeEntityException
public static void printCheckouts(File viewContext)
public static Version getVersion(String version) throws UnableToInitializeEntityException
public String getElementObjectId() throws CleartoolException
CleartoolException
Copyright © 2016–2018. All rights reserved.