Class MarketPlaceApp


  • public class MarketPlaceApp
    extends PoolElement
    This class represents an OpenNebula MarketPlaceApp. It also offers static XML-RPC call wrappers.
    • Constructor Detail

      • MarketPlaceApp

        public MarketPlaceApp​(int id,
                              Client client)
        Creates a new MarketPlaceApp representation.
        Parameters:
        id - The MarketPlaceApp id.
        client - XML-RPC Client.
      • MarketPlaceApp

        protected MarketPlaceApp​(org.w3c.dom.Node xmlElement,
                                 Client client)
        See Also:
        PoolElement
    • Method Detail

      • allocate

        public static OneResponse allocate​(Client client,
                                           java.lang.String description,
                                           int marketId)
        Allocates a new MarketPlaceApp in OpenNebula.
        Parameters:
        client - XML-RPC Client.
        description - A string containing the template of the MarketPlaceApp.
        marketId - The MarketPlace ID
        Returns:
        If successful the message contains the associated id generated for this MarketPlaceApp.
      • info

        public static OneResponse info​(Client client,
                                       int id)
        Retrieves the information of the given MarketPlaceApp.
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id for the MarketPlaceApp 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 App.
        Parameters:
        client - XML-RPC Client.
        id - The App id for the App to retrieve the information from
        decrypt - 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 an MarketPlaceApp from OpenNebula.
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id of the target MarketPlaceApp 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 template contents.
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id of the target MarketPlaceApp we want to modify.
        new_template - New template contents
        append - True to append new attributes instead of replace the whole template
        Returns:
        If successful the message contains the MarketPlaceApp id.
      • enable

        public static OneResponse enable​(Client client,
                                         int id,
                                         boolean enable)
        Enables or disables an MarketPlaceApp.
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id of the target MarketPlaceApp we want to modify.
        enable - True for enabling, false for disabling.
        Returns:
        If successful the message contains the MarketPlaceApp 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 MarketPlaceApp id of the target MarketPlaceApp 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 MarketPlaceApp permissions
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id of the target MarketPlaceApp we want to modify.
        owner_u - 1 to allow, 0 deny, -1 do not change
        owner_m - 1 to allow, 0 deny, -1 do not change
        owner_a - 1 to allow, 0 deny, -1 do not change
        group_u - 1 to allow, 0 deny, -1 do not change
        group_m - 1 to allow, 0 deny, -1 do not change
        group_a - 1 to allow, 0 deny, -1 do not change
        other_u - 1 to allow, 0 deny, -1 do not change
        other_m - 1 to allow, 0 deny, -1 do not change
        other_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 octed , 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 MarketPlaceApp
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id of the target MarketPlaceApp.
        name - New name for the MarketPlaceApp.
        Returns:
        If an error occurs the error message contains the reason.
      • lock

        public static OneResponse lock​(Client client,
                                       int id,
                                       int level)
        lock this MarketPlaceApp
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id.
        level - Lock level.
        Returns:
        If an error occurs the error message contains the reason.
      • unlock

        public static OneResponse unlock​(Client client,
                                         int id)
        Unlock this MarketPlaceApp
        Parameters:
        client - XML-RPC Client.
        id - The MarketPlaceApp id.
        Returns:
        If an error occurs the error message contains the reason.
      • info

        public OneResponse info()
        Retrieves the information of the MarketPlaceApp.
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • delete

        public OneResponse delete()
        Deletes the MarketPlaceApp from OpenNebula.
        Returns:
        A encapsulated response.
      • update

        public OneResponse update​(java.lang.String new_template)
        Replaces the template contents.
        Parameters:
        new_template - New template contents
        Returns:
        If successful the message contains the MarketPlaceApp id.
      • update

        public OneResponse update​(java.lang.String new_template,
                                  boolean append)
        Replaces the template contents.
        Parameters:
        new_template - New template contents
        append - True to append new attributes instead of replace the whole template
        Returns:
        If successful the message contains the MarketPlaceApp id.
      • enable

        public OneResponse enable​(boolean enable)
        Enables or disables the MarketPlaceApp.
        Parameters:
        enable - True for enabling, false for disabling.
        Returns:
        If successful the message contains the MarketPlaceApp id.
      • enable

        public OneResponse enable()
        Enables the MarketPlaceApp.
        Returns:
        If successful the message contains the MarketPlaceApp id.
      • disable

        public OneResponse disable()
        Disables the MarketPlaceApp.
        Returns:
        If successful the message contains the MarketPlaceApp 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 MarketPlaceApp permissions
        Parameters:
        owner_u - 1 to allow, 0 deny, -1 do not change
        owner_m - 1 to allow, 0 deny, -1 do not change
        owner_a - 1 to allow, 0 deny, -1 do not change
        group_u - 1 to allow, 0 deny, -1 do not change
        group_m - 1 to allow, 0 deny, -1 do not change
        group_a - 1 to allow, 0 deny, -1 do not change
        other_u - 1 to allow, 0 deny, -1 do not change
        other_m - 1 to allow, 0 deny, -1 do not change
        other_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 MarketPlaceApp
        Parameters:
        name - New name for the MarketPlaceApp.
        Returns:
        If an error occurs the error message contains the reason.
      • lock

        public OneResponse lock​(int level)
        Lock this MarketPlaceApp
        Parameters:
        level - Lock level.
        Returns:
        If an error occurs the error message contains the reason.
      • unlock

        public OneResponse unlock()
        Unlock this MarketPlaceApp
        Returns:
        If an error occurs the error message contains the reason.
      • stateString

        public java.lang.String stateString()
        Returns the state of the MarketPlaceApp.
        The method info() must be called before.
        Returns:
        The state of the MarketPlaceApp.
      • shortStateStr

        public java.lang.String shortStateStr()
        Returns the short length string state of the MarketPlaceApp.
        The method info() must be called before.
        Returns:
        The short length string state of the MarketPlaceApp.
      • type

        public int type()
        Returns the type of the MarketPlaceApp.
        Returns:
        The type of the MarketPlaceApp.
      • typeStr

        public java.lang.String typeStr()
        Returns the type of the MarketPlaceApp as a String.
        Returns:
        The type of the MarketPlaceApp as a String.
      • shortTypeStr

        public java.lang.String shortTypeStr()
        Returns the type of the MarketPlaceApp as a short String.
        Returns:
        The type of the MarketPlaceApp as a short String.
      • isEnabled

        public boolean isEnabled()
        Returns true if the MarketPlaceApp is enabled.
        Returns:
        True if the MarketPlaceApp is enabled.