com.vmware.vcloud.sdk.admin.extensions.service
Class AdminService

java.lang.Object
  extended by com.vmware.vcloud.sdk.VcloudResource<T>
      extended by com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.extension.AdminServiceType>
          extended by com.vmware.vcloud.sdk.admin.extensions.service.AdminService

public class AdminService
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.extension.AdminServiceType>

Helper class for the extension service in vCloud Admin Extension API.

Since:
API 5.1, SDK 5.1
Author:
Ecosystem Engineering

Constructor Summary
AdminService(VcloudClient client, com.vmware.vcloud.api.rest.schema.extension.AdminServiceType serviceResource)
          Default access constructor for creating a service helper class
 
Method Summary
 AdminApiDefinition createAdminApiDefinition(com.vmware.vcloud.api.rest.schema.extension.AdminApiDefinitionType apiDefinitionParams)
          Creates API definition.
 AdminApiFilter createAdminApiFilter(com.vmware.vcloud.api.rest.schema.extension.ApiFilterType apiFilterParams)
          Creates Api filter.
 AdminServiceLink createAdminLink(com.vmware.vcloud.api.rest.schema.extension.AdminServiceLinkType serviceLinkParams)
          Create service link.
 AdminApiFilter createResponseContentFilter(String responseContentType)
          Adding an API Response Content Filter pattern is added.
 Right createRight(com.vmware.vcloud.api.rest.schema.RightType rightType)
          Registers right to the rights managed by this extension service.
 Right createRight(String rightName, String rightDescription, String rightCategory, String bundleKey, String operationKey, String serviceNamespace)
          Creating a new right for managing the extension/service.
 AdminServiceLink createServiceLink(String linkHref, String relation, String resourceType, String mimeType, String resourceId)
          Creating a service link.
 AdminApiFilter createURLFilter(List<String> urlPatterns)
          An API URL filter pattern is added for this service.
 void delete()
          Delete the vcloud extension/service
 AdminService disable()
          Disable the extension/service
 ReferenceResult getAdminApiDefinitionRefs()
          Returns the list of all the service api definition references.
 ReferenceResult getAdminApiFilterRefs()
          Returns the list of all the Api filter references.
 ReferenceResult getAdminLinkRefs()
          Returns the list of all the service link references.
 ReferenceResult getAdminResourceClassRefs()
          Returns the list of all the resource class references.
static AdminService getAdminServiceById(VcloudClient client, String vCloudId)
          Get Service helper using the vCloud ID
static AdminService getAdminServiceByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType reference)
          Returns the Service Helper for the given service reference
 List<com.vmware.vcloud.api.rest.schema.ReferenceType> getRightRefs()
          Gives the rights registered by this extension service.
 boolean isAuthorized(com.vmware.vcloud.api.rest.schema.extension.AuthorizationCheckParamsType authorizationCheckParamsType)
          Checks user authorization for service, URL and request verb.
 AdminResourceClass registerAdminResourceClass(com.vmware.vcloud.api.rest.schema.extension.ResourceClassType resourceClassParams)
          Registers resource class for extension service.
 AdminResourceClass registerResourceClass(String name, String type, String nid, String urlTemplate, String urnPattern, String mimeType)
          Creating a new resource class.
 AdminService updateAdminService(com.vmware.vcloud.api.rest.schema.extension.AdminServiceType serviceParams)
          Update the vcloud extension/service.
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudEntity
getMetadata, getReference, getTasks
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudResource
getResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminService

public AdminService(VcloudClient client,
                    com.vmware.vcloud.api.rest.schema.extension.AdminServiceType serviceResource)
Default access constructor for creating a service helper class

Parameters:
client -
serviceResource - AdminServiceType
Method Detail

getAdminServiceByReference

public static AdminService getAdminServiceByReference(VcloudClient client,
                                                      com.vmware.vcloud.api.rest.schema.ReferenceType reference)
                                               throws VCloudException
Returns the Service Helper for the given service reference

Parameters:
client -
reference -
Returns:
AdminService
Throws:
VCloudException

getAdminServiceById

public static AdminService getAdminServiceById(VcloudClient client,
                                               String vCloudId)
                                        throws VCloudException
Get Service helper using the vCloud ID

Parameters:
client - VcloudClient
vCloudId - format - The vCloud ID is of the form: "urn:vcloud:type:uuid". For example: "urn:vcloud:media:d9d976ba-e0ec-4682-a67d-380af49b54e1". String
Returns:
AdminService
Throws:
VCloudException

updateAdminService

public AdminService updateAdminService(com.vmware.vcloud.api.rest.schema.extension.AdminServiceType serviceParams)
                                throws VCloudException
Update the vcloud extension/service.

Parameters:
serviceParams - AdminServiceType
Returns:
AdminService
Throws:
VCloudException

disable

public AdminService disable()
                     throws VCloudException
Disable the extension/service

Returns:
AdminService
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

delete

public void delete()
            throws VCloudException
Delete the vcloud extension/service

Throws:
VCloudException

createRight

public Right createRight(com.vmware.vcloud.api.rest.schema.RightType rightType)
                  throws VCloudException
Registers right to the rights managed by this extension service. The right will be added only if a right with the same name does not already exists.

Parameters:
rightType -
Returns:
Right
Throws:
VCloudException

createRight

public Right createRight(String rightName,
                         String rightDescription,
                         String rightCategory,
                         String bundleKey,
                         String operationKey,
                         String serviceNamespace)
                  throws VCloudException
Creating a new right for managing the extension/service.

Parameters:
rightName -
rightDescription -
rightCategory -
bundleKey -
Returns:
Right
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

createAdminLink

public AdminServiceLink createAdminLink(com.vmware.vcloud.api.rest.schema.extension.AdminServiceLinkType serviceLinkParams)
                                 throws VCloudException
Create service link.

Parameters:
serviceLinkParams -
Returns:
AdminServiceLink
Throws:
VCloudException

createServiceLink

public AdminServiceLink createServiceLink(String linkHref,
                                          String relation,
                                          String resourceType,
                                          String mimeType,
                                          String resourceId)
                                   throws VCloudException
Creating a service link.

Parameters:
linkHref -
relation -
resourceType -
mimeType -
resourceId -
Returns:
AdminServiceLink
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

createAdminApiDefinition

public AdminApiDefinition createAdminApiDefinition(com.vmware.vcloud.api.rest.schema.extension.AdminApiDefinitionType apiDefinitionParams)
                                            throws VCloudException
Creates API definition.

Parameters:
apiDefinitionParams -
Returns:
AdminApiDefinition
Throws:
VCloudException

registerAdminResourceClass

public AdminResourceClass registerAdminResourceClass(com.vmware.vcloud.api.rest.schema.extension.ResourceClassType resourceClassParams)
                                              throws VCloudException
Registers resource class for extension service. The resource class will be added only if a resource class with the same name does not exist.

Parameters:
resourceClassParams -
Returns:
AdminResourceClass
Throws:
VCloudException

registerResourceClass

public AdminResourceClass registerResourceClass(String name,
                                                String type,
                                                String nid,
                                                String urlTemplate,
                                                String urnPattern,
                                                String mimeType)
                                         throws VCloudException
Creating a new resource class.

Parameters:
name -
type -
nid -
urlTemplate -
mimeType -
Returns:
AdminResourceClass
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

createAdminApiFilter

public AdminApiFilter createAdminApiFilter(com.vmware.vcloud.api.rest.schema.extension.ApiFilterType apiFilterParams)
                                    throws VCloudException
Creates Api filter.

Parameters:
apiFilterParams -
Returns:
AdminApiFilter
Throws:
VCloudException

createURLFilter

public AdminApiFilter createURLFilter(List<String> urlPatterns)
                               throws VCloudException
An API URL filter pattern is added for this service. The provided URL pattern is matched with the incoming requests and routed accordingly.

Parameters:
urlPatterns -
Returns:
AdminApiFilter
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

createResponseContentFilter

public AdminApiFilter createResponseContentFilter(String responseContentType)
                                           throws VCloudException
Adding an API Response Content Filter pattern is added. The provided response content pattern is matched with the outgoing responses and routed accordingly.

Parameters:
responseContentType -
Returns:
AdminApiFilter
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

getRightRefs

public List<com.vmware.vcloud.api.rest.schema.ReferenceType> getRightRefs()
                                                                   throws VCloudException
Gives the rights registered by this extension service.

Returns:
List<ReferenceType>
Throws:
VCloudException

getAdminLinkRefs

public ReferenceResult getAdminLinkRefs()
                                 throws VCloudException
Returns the list of all the service link references.

Returns:
ReferenceResult
Throws:
VCloudException

getAdminApiDefinitionRefs

public ReferenceResult getAdminApiDefinitionRefs()
                                          throws VCloudException
Returns the list of all the service api definition references.

Returns:
ReferenceResult
Throws:
VCloudException

getAdminResourceClassRefs

public ReferenceResult getAdminResourceClassRefs()
                                          throws VCloudException
Returns the list of all the resource class references.

Returns:
ReferenceResult
Throws:
VCloudException

getAdminApiFilterRefs

public ReferenceResult getAdminApiFilterRefs()
                                      throws VCloudException
Returns the list of all the Api filter references.

Returns:
ReferenceResult
Throws:
VCloudException

isAuthorized

public boolean isAuthorized(com.vmware.vcloud.api.rest.schema.extension.AuthorizationCheckParamsType authorizationCheckParamsType)
                     throws VCloudException
Checks user authorization for service, URL and request verb. Returns true if authorized, otherwise false.

Parameters:
authorizationCheckParamsType -
Returns:
Boolean
Throws:
VCloudException
Since:
API 5.1, SDK 5.1


Copyright © 2016. All Rights Reserved.