public class FileRequest extends Object
File loader file load/save requests class.
Modifier and Type | Field and Description |
---|---|
static String |
AttrProtocol |
static String |
AttrUserName |
static int |
DELETE |
static int |
LOAD |
static int |
SAVE |
static int |
TRANSSAVE |
Modifier | Constructor and Description |
---|---|
protected |
FileRequest(int typ)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(NameValue attr)
Add an attribute
|
NameValueList |
getAttributes()
Return the associated attributes list
|
String |
getAttributesString()
Get the attributes as a comma delimted list
|
int |
getThreadId()
Return the thread id of the worker thread servicing the request
|
int |
getTransactionId()
Return the transaction id
|
NameValue |
hasAttribute(String attrName)
Check for the specified attribute
|
boolean |
hasAttributes()
Check if the file request has any attributes
|
boolean |
isLastTransactionFile()
Check if the request is the last file in the transaction
|
boolean |
isTransaction()
Check if the request is part of a transaction
|
int |
isType()
Return the file request type
|
void |
setAttributes(String attrs)
Set the attributes from a comma delimted list
|
void |
setThreadId(int id)
Set the thread id of the worker thread servicing the request
|
void |
setTransactionId(int id)
Set the transaction id
|
void |
setTransactionId(int id,
boolean last)
Set the transaction id and last file of transaction flag
|
public static final int LOAD
public static final int SAVE
public static final int TRANSSAVE
public static final int DELETE
public static final String AttrUserName
public static final String AttrProtocol
protected FileRequest(int typ)
typ
- intpublic final int isType()
public final int getThreadId()
public final boolean isLastTransactionFile()
public final boolean isTransaction()
public final int getTransactionId()
public final void setThreadId(int id)
id
- intpublic final void setTransactionId(int id)
id
- intpublic final void setTransactionId(int id, boolean last)
id
- intlast
- booleanpublic final boolean hasAttributes()
public final NameValueList getAttributes()
public final void addAttribute(NameValue attr)
attr
- NameValuepublic final NameValue hasAttribute(String attrName)
attrName
- Stringpublic final String getAttributesString()
public final void setAttributes(String attrs)
attrs
- StringCopyright © 2005–2017 Alfresco Software. All rights reserved.