com.perforce.p4java.core.file
Interface IFileOperationResult

All Superinterfaces:
IServerResource
All Known Subinterfaces:
IExtendedFileSpec, IFileSpec
All Known Implementing Classes:
ExtendedFileSpec, FileSpec

public interface IFileOperationResult
extends IServerResource

Defines the broadest operations available on file specs returned from Perforce file operations.

IFileOperationResult is the base interface for the IFileSpec family of interfaces, and is used to signal and store the synchronous error returns from methods that return file specs and lists of file specs. This is needed due to the Perforce server's penchant for returning info and error messages intertwined with "normal" file specs; this interface can be used to determine the status of a specific returned file spec.

In general, if an IFileOperationResult object has been returned from a server or client (etc.) method, the getOpStatus() method will indicate whether the associated values are "valid" (i.e. were filled-in or whatever by the underlying server) or represent an error or informational event. In the latter cases, the getStatusMessage() method returns the associated server message, and the other fields in the file spec are not guaranteed to contain useful values.

Note that although IFileOperationResult extends the IServerResource interface, current implementations are not refreshable, updateable, or completable through that interface, and isComplete() will currently always return true.


Method Summary
 int getGenericCode()
          Get the Perforce generic code associated with the operation result.
 FileSpecOpStatus getOpStatus()
          Return the particular Perforce operation status associated with the specific Perforce file spec operation.
 int getRawCode()
          Get the Perforce raw code associated with the operation result.
 int getSeverityCode()
          Get the Perforce severity code associated with the operation result.
 String getStatusMessage()
          Return the status message associated with the operation (this may be an error or informational message, depending on the operation).
 int getSubCode()
          Get the Perforce 'sub' code associated with the operation result.
 int getSubSystem()
          Get the Perforce sub system code associated with the operation result.
 int getUniqueCode()
          Get the Perforce 'unqieu' code associated with the operation result.
 
Methods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, refresh, setServer, update, update, update
 

Method Detail

getOpStatus

FileSpecOpStatus getOpStatus()
Return the particular Perforce operation status associated with the specific Perforce file spec operation.

Returns:
non-null FileSpecOpStatus for the specific file spec return.

getStatusMessage

String getStatusMessage()
Return the status message associated with the operation (this may be an error or informational message, depending on the operation). Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID.

Returns:
possibly-null Perforce operation message.

getSeverityCode

int getSeverityCode()
Get the Perforce severity code associated with the operation result. Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID.

Returns:
integer severity code.

getGenericCode

int getGenericCode()
Get the Perforce generic code associated with the operation result. Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID.

Returns:
integer generic code.

getRawCode

int getRawCode()
Get the Perforce raw code associated with the operation result. Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID, and the status was set as the result of a server-side issue.


getUniqueCode

int getUniqueCode()
Get the Perforce 'unqieu' code associated with the operation result. Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID, and the status was set as the result of a server-side issue.


getSubSystem

int getSubSystem()
Get the Perforce sub system code associated with the operation result. Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID, and the status was set as the result of a server-side issue.


getSubCode

int getSubCode()
Get the Perforce 'sub' code associated with the operation result. Will only be meaningful if the associated op status returned by getOpStatus() is neither UNKNOWN nor VALID, and the status was set as the result of a server-side issue.



Copyright © 2015 Perforce Software. All Rights Reserved.