org.rhq.enterprise.server.resource
Interface ResourceFactoryManagerRemote

All Known Subinterfaces:
WebservicesRemote

public interface ResourceFactoryManagerRemote


Method Summary
 CreateResourceHistory createPackageBackedResource(Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, Configuration deploymentTimeConfiguration, byte[] packageBits, Integer timeout)
          Creates a new physical resource.
 CreateResourceHistory createPackageBackedResourceViaPackageVersion(Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, Configuration pluginConfiguration, Configuration deploymentTimeConfiguration, int packageVersionId, Integer timeout)
          Creates a new physical resource.
 CreateResourceHistory createResource(Subject subject, int parentResourceId, int resourceTypeId, String resourceName, Configuration pluginConfiguration, Configuration resourceConfiguration, Integer timeout)
          Creates a new physical resource.
 DeleteResourceHistory deleteResource(Subject subject, int resourceId)
          Deletes a physical resource from the agent machine.
 List<DeleteResourceHistory> deleteResources(Subject subject, int[] resourceIds)
          Deletes physical resources from the agent machine.
 PageList<CreateResourceHistory> findCreateChildResourceHistory(Subject subject, int parentResourceId, Long beginDate, Long endDate, PageControl pageControl)
          Returns a pagination enabled list of requests for the creation of new child resources to the specified parent.
 PageList<DeleteResourceHistory> findDeleteChildResourceHistory(Subject subject, int parentResourceId, Long beginDate, Long endDate, PageControl pageControl)
          Returns a pagination enabled list of requests to delete a child resource on the specified parent.
 

Method Detail

createResource

CreateResourceHistory createResource(Subject subject,
                                     int parentResourceId,
                                     int resourceTypeId,
                                     String resourceName,
                                     Configuration pluginConfiguration,
                                     Configuration resourceConfiguration,
                                     Integer timeout)
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONFIGURATION. If this call is made for a resource type that cannot be created via a configuration, the plugin container will throw an exception.

Parameters:
subject - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
resourceTypeId - type of resource to create
resourceName - name of the resource being created
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
resourceConfiguration - resource configuration for the new resource
timeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.

createPackageBackedResource

CreateResourceHistory createPackageBackedResource(Subject subject,
                                                  int parentResourceId,
                                                  int newResourceTypeId,
                                                  String newResourceName,
                                                  Configuration pluginConfiguration,
                                                  String packageName,
                                                  String packageVersion,
                                                  Integer architectureId,
                                                  Configuration deploymentTimeConfiguration,
                                                  byte[] packageBits,
                                                  Integer timeout)
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a resource type that cannot be created via an package, the plugin container will throw an exception.

Parameters:
subject - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
newResourceTypeId - identifies the type of resource being created
newResourceName - Ignored, pass null. This is determined from the package.
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
packageName - name of the package that will be created as a result of this resource create
packageVersion - The string version of the package. If null will be set to system timestamp (long)
architectureId - Id of the target architecture of the package, null indicates NoArch (any).
deploymentTimeConfiguration - dictates how the package will be deployed
packageBits - content of the package to create
timeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.

createPackageBackedResourceViaPackageVersion

CreateResourceHistory createPackageBackedResourceViaPackageVersion(Subject subject,
                                                                   int parentResourceId,
                                                                   int newResourceTypeId,
                                                                   String newResourceName,
                                                                   Configuration pluginConfiguration,
                                                                   Configuration deploymentTimeConfiguration,
                                                                   int packageVersionId,
                                                                   Integer timeout)
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a resource type that cannot be created via an package, the plugin container will throw an exception.

Parameters:
subject - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
newResourceTypeId - identifies the type of resource being created
newResourceName - Ignored, pass null. This is determined from the package.
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
deploymentTimeConfiguration - dictates how the package will be deployed
packageVersionId - An existing package version to back this resource
timeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.

deleteResource

DeleteResourceHistory deleteResource(Subject subject,
                                     int resourceId)
Deletes a physical resource from the agent machine. After this call, the resource will no longer be accessible not only to JON, but in general. It is up to the plugin to determine how to complete the delete, but a deleted resource will no longer be returned from resource discoveries.

Parameters:
subject - user requesting the deletion. must have resource delete perm on the resource.
resourceId - resource being deleted

deleteResources

List<DeleteResourceHistory> deleteResources(Subject subject,
                                            int[] resourceIds)
Deletes physical resources from the agent machine. After this call, the resource will no longer be accessible not only to JON, but in general. It is up to the plugin to determine how to complete the delete, but a deleted resource will no longer be returned from resource discoveries.

Parameters:
subject - user requesting the deletion. must have resource delete perm on the resources.
resourceIds - the resources being deleted

findCreateChildResourceHistory

PageList<CreateResourceHistory> findCreateChildResourceHistory(Subject subject,
                                                               int parentResourceId,
                                                               Long beginDate,
                                                               Long endDate,
                                                               PageControl pageControl)
Returns a pagination enabled list of requests for the creation of new child resources to the specified parent. These requests may be completed or still in progress; it represents the history of creation attempts for this parent resource.

Parameters:
subject - the user making the request
parentResourceId - resource to check for child resource creations
beginDate - filter used to show only results occurring after this epoch millis parameter, nullable
endDate - filter used to show only results occurring before this epoch millis parameter, nullable
pageControl - control for pagination
Returns:
list of requests

findDeleteChildResourceHistory

PageList<DeleteResourceHistory> findDeleteChildResourceHistory(Subject subject,
                                                               int parentResourceId,
                                                               Long beginDate,
                                                               Long endDate,
                                                               PageControl pageControl)
Returns a pagination enabled list of requests to delete a child resource on the specified parent. These requests may be complete or still in progress; it represents the history of all delete attempts of child resources to this resource.

Parameters:
subject - the user making the request
parentResourceId - resource to check for deleted child resources
beginDate - filter used to show only results occurring after this epoch millis parameter, nullable
endate - filter used to show only results occurring before this epoch millis parameter, nullable
pageControl - control for pagination
Returns:
list of requests


Copyright © 2005-2011 Red Hat, Inc.. All Rights Reserved.