Class MarketPlace
- java.lang.Object
-
- org.opennebula.client.PoolElement
-
- org.opennebula.client.marketplace.MarketPlace
-
public class MarketPlace extends PoolElement
This class represents an OpenNebula MarketPlace. It also offers static XML-RPC call wrappers.
-
-
Field Summary
-
Fields inherited from class org.opennebula.client.PoolElement
client, id, xml, xpath
-
-
Constructor Summary
Constructors Modifier Constructor Description MarketPlace(int id, Client client)
Creates a new MarketPlace representation.protected
MarketPlace(org.w3c.dom.Node xmlElement, Client client)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OneResponse
allocate(Client client, java.lang.String description)
Allocates a new MarketPlace in OpenNebula.OneResponse
chgrp(int gid)
Changes the groupOneResponse
chmod(int octet)
Changes the permissionsOneResponse
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 MarketPlace permissionsOneResponse
chmod(java.lang.String octet)
Changes the permissionsstatic OneResponse
chmod(Client client, int id, int octet)
Changes the permissionsstatic OneResponse
chmod(Client client, int id, 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 MarketPlace permissionsstatic OneResponse
chmod(Client client, int id, java.lang.String octet)
Changes the permissionsOneResponse
chown(int uid)
Changes the ownerOneResponse
chown(int uid, int gid)
Changes the owner/groupstatic OneResponse
chown(Client client, int id, int uid, int gid)
Changes the owner/groupboolean
contains(int id)
Returns whether or not the App is part of this MarketPlaceOneResponse
delete()
Deletes the MarketPlace from OpenNebula.static OneResponse
delete(Client client, int id)
Deletes a MarketPlace from OpenNebula.OneResponse
enable(boolean enable)
Enable or disable this Marketplace.static OneResponse
enable(Client client, int id, boolean enable)
Enable or disable the Marketplace.OneResponse
info()
Retrieves the information of the MarketPlace.static OneResponse
info(Client client, int id)
Retrieves the information of the given MarketPlace.static OneResponse
info(Client client, int id, boolean decrypt)
Retrieves the information of the given MarketPlace.OneResponse
rename(java.lang.String name)
Renames this MarketPlacestatic OneResponse
rename(Client client, int id, java.lang.String name)
Renames this MarketPlace.OneResponse
update(java.lang.String new_template)
Replaces the MarketPlace template.OneResponse
update(java.lang.String new_template, boolean append)
Replaces the MarketPlace template.static OneResponse
update(Client client, int id, java.lang.String new_template, boolean append)
Replaces the MarketPlace contents.
-
-
-
Constructor Detail
-
MarketPlace
public MarketPlace(int id, Client client)
Creates a new MarketPlace representation.- Parameters:
id
- The MarketPlace id.client
- XML-RPC Client.
-
MarketPlace
protected MarketPlace(org.w3c.dom.Node xmlElement, Client client)
- See Also:
PoolElement
-
-
Method Detail
-
allocate
public static OneResponse allocate(Client client, java.lang.String description)
Allocates a new MarketPlace in OpenNebula.- Parameters:
client
- XML-RPC Client.description
- A string containing the template of the MarketPlace.- Returns:
- If successful the message contains the associated id generated for this MarketPlace.
-
info
public static OneResponse info(Client client, int id)
Retrieves the information of the given MarketPlace.- Parameters:
client
- XML-RPC Client.id
- The MarketPlace id to retrieve the information from- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
info
public static OneResponse info(Client client, int id, boolean decrypt)
Retrieves the information of the given MarketPlace.- Parameters:
client
- XML-RPC Client.id
- The MarketPlace id for the MarketPlace to retrieve the information fromdecrypt
- If true decrypt sensitive attributes- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
delete
public static OneResponse delete(Client client, int id)
Deletes a MarketPlace from OpenNebula.- Parameters:
client
- XML-RPC Client.id
- The id of the target MarketPlace we want to delete.- Returns:
- A encapsulated response.
-
update
public static OneResponse update(Client client, int id, java.lang.String new_template, boolean append)
Replaces the MarketPlace contents.- Parameters:
client
- XML-RPC Client.id
- The id of the target MarketPlace we want to modify.new_template
- New MarketPlace contents.append
- True to append new attributes instead of replace the whole template- Returns:
- If successful the message contains the MarketPlace id.
-
chown
public static OneResponse chown(Client client, int id, int uid, int gid)
Changes the owner/group- Parameters:
client
- XML-RPC Client.id
- The id of the target MarketPlace we want to modify.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.- Returns:
- If an error occurs the error message contains the reason.
-
chmod
public static OneResponse chmod(Client client, int id, 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 MarketPlace permissions- Parameters:
client
- XML-RPC Client.id
- The id of the target MarketPlace.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 change- Returns:
- If an error occurs the error message contains the reason.
-
chmod
public static OneResponse chmod(Client client, int id, java.lang.String octet)
Changes the permissions- Parameters:
client
- XML-RPC Client.id
- The id of the target object.octet
- Permissions octet, e.g. 640- Returns:
- If an error occurs the error message contains the reason.
-
chmod
public static OneResponse chmod(Client client, int id, int octet)
Changes the permissions- Parameters:
client
- XML-RPC Client.id
- The id of the target object.octet
- Permissions octed , e.g. 640- Returns:
- If an error occurs the error message contains the reason.
-
rename
public static OneResponse rename(Client client, int id, java.lang.String name)
Renames this MarketPlace.- Parameters:
client
- XML-RPC Client.id
- The id of the target object.name
- New name for the MarketPlace- Returns:
- If successful the message contains the MarketPlace id.
-
enable
public static OneResponse enable(Client client, int id, boolean enable)
Enable or disable the Marketplace.- Parameters:
client
- XML-RPC Client.id
- The id of the target object.enable
- True for enabling, false for disabling- Returns:
- If successful the message contains the MarketPlace id.
-
info
public OneResponse info()
Retrieves the information of the MarketPlace.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
delete
public OneResponse delete()
Deletes the MarketPlace from OpenNebula.- Returns:
- A encapsulated response.
-
update
public OneResponse update(java.lang.String new_template)
Replaces the MarketPlace template.- Parameters:
new_template
- New MarketPlace template.- Returns:
- If successful the message contains the MarketPlace id.
-
update
public OneResponse update(java.lang.String new_template, boolean append)
Replaces the MarketPlace template.- Parameters:
new_template
- New MarketPlace template.append
- True to append new attributes instead of replace the whole template- Returns:
- If successful the message contains the MarketPlace id.
-
chown
public OneResponse chown(int uid, int gid)
Changes the owner/group- Parameters:
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.- Returns:
- If an error occurs the error message contains the reason.
-
chown
public OneResponse chown(int uid)
Changes the owner- Parameters:
uid
- The new owner user ID.- Returns:
- If an error occurs the error message contains the reason.
-
chgrp
public OneResponse chgrp(int gid)
Changes the group- Parameters:
gid
- The new group ID.- Returns:
- If an error occurs the error message contains the reason.
-
chmod
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)
Changes the MarketPlace permissions- Parameters:
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 change- Returns:
- If an error occurs the error message contains the reason.
-
chmod
public OneResponse chmod(java.lang.String octet)
Changes the permissions- Parameters:
octet
- Permissions octed , e.g. 640- Returns:
- If an error occurs the error message contains the reason.
-
chmod
public OneResponse chmod(int octet)
Changes the permissions- Parameters:
octet
- Permissions octed , e.g. 640- Returns:
- If an error occurs the error message contains the reason.
-
rename
public OneResponse rename(java.lang.String name)
Renames this MarketPlace- Parameters:
name
- New name for the MarketPlace.- Returns:
- If an error occurs the error message contains the reason.
-
enable
public OneResponse enable(boolean enable)
Enable or disable this Marketplace.- Parameters:
enable
- True for enabling, false for disabling- Returns:
- If successful the message contains the MarketPlace id.
-
contains
public boolean contains(int id)
Returns whether or not the App is part of this MarketPlace- Parameters:
id
- The App ID.- Returns:
- Whether or not the App is part of this MarketPlace.
-
-