public abstract class Document extends PoolElement
DocumentPool
public class GenericObjA extends Document
{
private static final int TYPE = 200;
public GenericObjA(int id, Client client)
{
super(id, client);
}
public GenericObjA(Node xmlElement, Client client)
{
super(xmlElement, client);
}
public static OneResponse allocate(Client client, String description)
{
return Document.allocate(client, description, TYPE);
}
}
client, id, xml, xpath| Constructor and Description |
|---|
Document(int id,
Client client)
Creates a new Document representation.
|
Document(org.w3c.dom.Node xmlElement,
Client client) |
| Modifier and Type | Method and Description |
|---|---|
protected static OneResponse |
allocate(Client client,
java.lang.String description,
int type)
Allocates a new Document in OpenNebula.
|
OneResponse |
chgrp(int gid)
Changes the group
|
OneResponse |
chmod(int octet)
Changes the permissions
|
OneResponse |
chmod(int owner_u,
int owner_m,
int owner_a,
int group_u,
int group_m,
int group_a,
int other_u,
int other_m,
int other_a)
Changes the document permissions
|
OneResponse |
chmod(java.lang.String octet)
Changes the permissions
|
OneResponse |
chown(int uid)
Changes the owner
|
OneResponse |
chown(int uid,
int gid)
Changes the owner/group
|
OneResponse |
clone(java.lang.String name)
Clones this document into a new one
|
OneResponse |
delete()
Deletes a document from OpenNebula.
|
OneResponse |
info()
Retrieves the information of the given Document.
|
OneResponse |
publish()
Publishes the document.
|
OneResponse |
publish(boolean publish)
Publishes or unpublishes a document.
|
OneResponse |
rename(java.lang.String name)
Renames this document
|
OneResponse |
unpublish()
Unpublishes the document.
|
OneResponse |
update(java.lang.String new_document)
Replaces the document template contents.
|
OneResponse |
update(java.lang.String new_document,
boolean append)
Replaces the document template contents.
|
public Document(int id,
Client client)
id - The document id.client - XML-RPC Client.public Document(org.w3c.dom.Node xmlElement,
Client client)
PoolElementprotected static OneResponse allocate(Client client, java.lang.String description, int type)
client - XML-RPC Client.description - A string containing the template of the document.public OneResponse info()
public OneResponse delete()
public OneResponse update(java.lang.String new_document)
new_document - New template contents.public OneResponse update(java.lang.String new_document, boolean append)
new_document - New template contents.append - True to append new attributes instead of replace the whole templatepublic OneResponse publish(boolean publish)
publish - True for publishing, false for unpublishing.public OneResponse chown(int uid, int gid)
uid - The new owner user ID. Set it to -1 to leave the current one.gid - The new group ID. Set it to -1 to leave the current one.public OneResponse chmod(int owner_u, int owner_m, int owner_a, int group_u, int group_m, int group_a, int other_u, int other_m, int other_a)
owner_u - 1 to allow, 0 deny, -1 do not changeowner_m - 1 to allow, 0 deny, -1 do not changeowner_a - 1 to allow, 0 deny, -1 do not changegroup_u - 1 to allow, 0 deny, -1 do not changegroup_m - 1 to allow, 0 deny, -1 do not changegroup_a - 1 to allow, 0 deny, -1 do not changeother_u - 1 to allow, 0 deny, -1 do not changeother_m - 1 to allow, 0 deny, -1 do not changeother_a - 1 to allow, 0 deny, -1 do not changepublic OneResponse chmod(java.lang.String octet)
octet - Permissions octed , e.g. 640public OneResponse chmod(int octet)
octet - Permissions octed , e.g. 640public OneResponse clone(java.lang.String name)
name - Name for the new document.public OneResponse rename(java.lang.String name)
name - New name for the document.public OneResponse publish()
public OneResponse unpublish()
public OneResponse chown(int uid)
uid - The new owner user ID.public OneResponse chgrp(int gid)
gid - The new group ID.Visit OpenNebula.org
Copyright 2002-2013 ©
OpenNebula Project (OpenNebula.org), C12G Labs.