com.perforce.p4java.core.file
Enum FileAction

java.lang.Object
  extended by java.lang.Enum<FileAction>
      extended by com.perforce.p4java.core.file.FileAction
All Implemented Interfaces:
Serializable, Comparable<FileAction>

public enum FileAction
extends Enum<FileAction>

Defines the possible Perforce actions that can be associated with a Perforce file, including synchronization actions. Also used to indicate open status for files on pending changelists, resolve status, etc.

Basically self-explanatory if you have much experience with Perforce, but if not, the main Perforce documentation goes into great detail about each of these actions.


Enum Constant Summary
ABANDONED
           
ADD
           
ADDED
           
BRANCH
           
COPY_FROM
           
DELETE
           
DELETED
           
EDIT
           
EDIT_FROM
           
EDIT_IGNORED
           
IGNORED
           
IMPORT
           
INTEGRATE
           
MERGE_FROM
           
MOVE
           
MOVE_ADD
           
MOVE_DELETE
           
PURGE
           
REFRESHED
           
REPLACED
           
RESOLVED
           
SYNC
           
UNKNOWN
           
UNRESOLVED
           
UPDATED
           
 
Method Summary
static FileAction fromString(String str)
          A user-friendly fail-safe way to convert from strings to file actions without generating exceptions, etc.
 String toString()
          Provide a string representation that looks like the same actions seen through the p4 command interpreter rather than the raw enum.
static FileAction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FileAction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADD

public static final FileAction ADD

BRANCH

public static final FileAction BRANCH

EDIT

public static final FileAction EDIT

INTEGRATE

public static final FileAction INTEGRATE

DELETE

public static final FileAction DELETE

SYNC

public static final FileAction SYNC

UPDATED

public static final FileAction UPDATED

ADDED

public static final FileAction ADDED

REFRESHED

public static final FileAction REFRESHED

REPLACED

public static final FileAction REPLACED

DELETED

public static final FileAction DELETED

IGNORED

public static final FileAction IGNORED

ABANDONED

public static final FileAction ABANDONED

EDIT_IGNORED

public static final FileAction EDIT_IGNORED

MOVE

public static final FileAction MOVE

MOVE_ADD

public static final FileAction MOVE_ADD

MOVE_DELETE

public static final FileAction MOVE_DELETE

RESOLVED

public static final FileAction RESOLVED

UNRESOLVED

public static final FileAction UNRESOLVED

COPY_FROM

public static final FileAction COPY_FROM

MERGE_FROM

public static final FileAction MERGE_FROM

EDIT_FROM

public static final FileAction EDIT_FROM

PURGE

public static final FileAction PURGE

IMPORT

public static final FileAction IMPORT

UNKNOWN

public static final FileAction UNKNOWN
Method Detail

values

public static FileAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FileAction c : FileAction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FileAction valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromString

public static FileAction fromString(String str)
A user-friendly fail-safe way to convert from strings to file actions without generating exceptions, etc.

Parameters:
str - upper, lower, or mixed-case candidate string, or null
Returns:
null if no match or if str was null, otherwise returns the closest matching file action

toString

public String toString()
Provide a string representation that looks like the same actions seen through the p4 command interpreter rather than the raw enum.

Overrides:
toString in class Enum<FileAction>
See Also:
Enum.toString()


Copyright © 2015 Perforce Software. All Rights Reserved.