public class AttachmentSet extends Object
AttachmenSet implement the operations on attachmentset from Resource.
It provides the set of Attachment.
This object can be created by AttachmentSet.
The following code shows how to create AttachmentSet using AttachmentSet Constructor
Resource res = new Resource();
AttachmentSet ats = res.attachmentSet(doclinAttrName,relName);
The following examples demonstrate how to build a new AttachmentSet
AttachmentSet ats = new AttachmentSet();
AttachmentSet ats = new AttachmentSet(jsonobject,maximoconnector);
AttachmentSet ats = new AttachmentSet(uri,maximoconnector);
The following examples demonstrate how to set uri and jsonobject to Attachment
ats.href(uri);
ats.JsonObject(jo);
The following examples show how to load and reload data
att.load();
att.reload();
The following examples show how to get AttachmentSet data from AttachmentSet
JsonObject jo = att.toJSON();
byte[] jodata = att.toJSONBytes();
String uri = att.getURI();
The following examples show how to create, get and delete Attachment fromAttachmentSet
Attachment att = ats.create(new Attachment());
Attachment att = ats.create(relation, new Attachment());
Attachment att = ats.member(index);
Attachment att = ats.member(id);
ats.delete(index);
ats.delete(id);
The following example shows how to get the this page size from AttachmentSet
int currentPageSize = ats.thisPageSize();
| Constructor and Description |
|---|
AttachmentSet() |
AttachmentSet(javax.json.JsonObject jo,
MaximoConnector mc) |
AttachmentSet(MaximoConnector mc) |
AttachmentSet(String href,
MaximoConnector mc) |
| Modifier and Type | Method and Description |
|---|---|
Attachment |
create(Attachment att)
Create a new attachment
|
Attachment |
create(String relation,
Attachment att) |
Attachment |
create(String relation,
Attachment att,
Map<String,Object> headers) |
AttachmentSet |
delete(int index)
Delete the Attachment
|
AttachmentSet |
delete(String id) |
Attachment |
fetchMember(String uri,
Map<String,Object> headers,
String... properties) |
Attachment |
fetchMember(String uri,
String... properties) |
String |
getURI()
Get current URI
|
AttachmentSet |
href(String href) |
AttachmentSet |
JsonObject(javax.json.JsonObject jo) |
AttachmentSet |
load()
Load the data for attachmentset
|
AttachmentSet |
load(Map<String,Object> headers) |
Attachment |
member(int index)
Get the member of attachmentset
|
Attachment |
member(String id) |
AttachmentSet |
reload() |
int |
thisPageSize() |
javax.json.JsonObject |
toJSON()
Get AttahcmentSet data in JSON
|
byte[] |
toJSONBytes()
Get AttahcmentSet data in JSONBytes
|
public AttachmentSet()
public AttachmentSet(MaximoConnector mc)
public AttachmentSet(javax.json.JsonObject jo,
MaximoConnector mc)
public AttachmentSet(String href, MaximoConnector mc)
public String getURI()
public javax.json.JsonObject toJSON()
throws IOException,
OslcException
IOExceptionOslcExceptionpublic byte[] toJSONBytes()
throws OslcException,
IOException
IOExceptionOslcExceptionpublic AttachmentSet href(String href)
public AttachmentSet JsonObject(javax.json.JsonObject jo)
public AttachmentSet load() throws IOException, OslcException
IOExceptionOslcExceptionpublic AttachmentSet load(Map<String,Object> headers) throws IOException, OslcException
IOExceptionOslcExceptionpublic AttachmentSet reload() throws IOException, OslcException
IOExceptionOslcExceptionpublic Attachment create(Attachment att) throws IOException, OslcException
att - IOExceptionOslcExceptionpublic Attachment create(String relation, Attachment att) throws IOException, OslcException
IOExceptionOslcExceptionpublic Attachment create(String relation, Attachment att, Map<String,Object> headers) throws IOException, OslcException
IOExceptionOslcExceptionpublic Attachment member(int index) throws IOException, OslcException
index - IOExceptionOslcExceptionpublic Attachment member(String id) throws IOException, OslcException
IOExceptionOslcExceptionpublic AttachmentSet delete(int index) throws IOException, OslcException
index - IOExceptionOslcExceptionpublic AttachmentSet delete(String id) throws IOException, OslcException
IOExceptionOslcExceptionpublic int thisPageSize()
throws IOException,
OslcException
IOExceptionOslcExceptionpublic Attachment fetchMember(String uri, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic Attachment fetchMember(String uri, Map<String,Object> headers, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionCopyright © 2018. All rights reserved.