|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.batch.BatchUtils
public class BatchUtils
New data model version of batch utils. These utilities can operate on both the old and the new data model, so should be used during the transition.
Method Summary | |
---|---|
static java.lang.String |
getBatchId(IEntry entry)
Gets the value of the tag <batch:id> . |
static BatchOperationType |
getBatchOperationType(IEntry entry)
Gets the batch operation type from the tag <batch:operation>
in a IEntry . |
static BatchOperationType |
getBatchOperationType(IFeed feed)
Gets the batch operation type from the tag <batch:operation>
in a BaseFeed . |
static IBatchInterrupted |
getInterrupted(IEntry entry)
Gets the value of the tag <batch:interrupted> . |
static IBatchStatus |
getStatus(IEntry entry)
Gets the value of the tag <batch:status> . |
static boolean |
isFailure(IEntry entry)
Checks whether a batch entry is an error report. |
static boolean |
isSuccess(IEntry entry)
Checks whether a batch entry is a success report. |
static void |
setBatchId(IEntry entry,
java.lang.String id)
Sets the value of the tag <batch:id> . |
static void |
setBatchOperationType(IEntry entry,
BatchOperationType op)
Sets the batch operation to execute in a IEntry . |
static void |
setBatchOperationType(IFeed feed,
BatchOperationType op)
Sets the batch operation to execute in a BaseFeed . |
static void |
throwIfInterrupted(IFeed ifeed)
Throws a BatchInterrupted exception if any entry within the feed
has a batch interrupted child element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getBatchId(IEntry entry)
<batch:id>
.
entry
- the entry to get the id from
public static void setBatchId(IEntry entry, java.lang.String id)
<batch:id>
.
entry
- entry to get the id fromid
- the batch id or null to remove itpublic static BatchOperationType getBatchOperationType(IEntry entry)
<batch:operation>
in a IEntry
.
entry
- the entry to get the operation type from
public static BatchOperationType getBatchOperationType(IFeed feed)
<batch:operation>
in a BaseFeed
.
feed
-
public static void setBatchOperationType(IEntry entry, BatchOperationType op)
IEntry
.
entry
- the entry to set the operation type onop
- batch operation type or null to remove itpublic static void setBatchOperationType(IFeed feed, BatchOperationType op)
BaseFeed
.
feed
- op
- batch operation type or null to remove it.public static IBatchInterrupted getInterrupted(IEntry entry)
<batch:interrupted>
.
entry
-
public static IBatchStatus getStatus(IEntry entry)
<batch:status>
.
entry
-
public static boolean isSuccess(IEntry entry)
BatchStatus
object.
entry
-
java.lang.IllegalArgumentException
- if the entry does not contain
a BatchStatus object.public static boolean isFailure(IEntry entry)
BatchStatus
object.
You'll want to call getStatus(IEntry)
to get the error description and message when this
method returns true.
entry
-
java.lang.IllegalArgumentException
- if the entry does not contain
a BatchStatus object.public static void throwIfInterrupted(IFeed ifeed) throws BatchInterruptedException
BatchInterrupted
exception if any entry within the feed
has a batch interrupted child element.
ifeed
- batch response feed to check
BatchInterruptedException
- if batch interrupted entry is found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |