org.rhq.enterprise.server.resource
Interface ResourceFactoryManagerLocal

All Known Implementing Classes:
ResourceFactoryManagerBean

public interface ResourceFactoryManagerLocal

Author:
Jason Dobies

Method Summary
 void checkForTimedOutRequests()
          Will check to see if any in progress resource creation jobs are taking too long to finish and if so marks them as failed.
 void completeCreateResource(CreateResourceResponse response)
          For documentation, see ResourceFactoryServerService.completeCreateResource(org.rhq.core.clientapi.agent.inventory.CreateResourceResponse) .
 void completeDeleteResourceRequest(DeleteResourceResponse response)
          For documentation, see ResourceFactoryServerService.completeDeleteResourceRequest(org.rhq.core.clientapi.agent.inventory.DeleteResourceResponse) .
 CreateResourceHistory createPackageBackedResource(Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, Configuration deploymentTimeConfiguration, byte[] packageBits)
           
 CreateResourceHistory createPackageBackedResourceViaPackageVersion(Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, Configuration pluginConfiguration, Configuration deploymentTimeConfiguration, int packageVersionId)
           
 CreateResourceHistory createResource(Subject subject, int parentResourceId, int resourceTypeId, String resourceName, Configuration pluginConfiguration, Configuration resourceConfiguration)
           
 CreateResourceHistory createResource(Subject user, int parentResourceId, int newResourceTypeId, String newResourceName, Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, Configuration deploymentTimeConfiguration, InputStream packageBitStream)
          Creates a new physical resource.
 CreateResourceHistory createResource(Subject user, int parentResourceId, int newResourceTypeId, String newResourceName, Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, Configuration deploymentTimeConfiguration, InputStream packageBitStream, Map<String,String> packageUploadDetails)
           
 DeleteResourceHistory deleteResource(Subject subject, int resourceId)
           
 List<DeleteResourceHistory> deleteResources(Subject subject, int[] resourceIds)
           
 PageList<CreateResourceHistory> findCreateChildResourceHistory(Subject subject, int parentResourceId, Long beginDate, Long endDate, PageControl pageControl)
           
 PageList<DeleteResourceHistory> findDeleteChildResourceHistory(Subject subject, int parentResourceId, Long beginDate, Long endDate, PageControl pageControl)
           
 int getCreateChildResourceHistoryCount(int parentResourceId, Long beginDate, Long endDate)
          Returns the number of requests to create a new child resource under the specified parent known to the system.
 CreateResourceHistory getCreateHistoryItem(int historyItemId)
          Returns the history item corresponding to the specified ID.
 int getDeleteChildResourceHistoryCount(int parentResourceId, Long beginDate, Long endDate)
          Returns the number of requests to delete a child resource from the specified parent resource.
 CreateResourceHistory persistCreateHistory(Subject user, int parentResourceId, int resourceTypeId, String createResourceName, Configuration configuration)
          Persists a record in the resource history to indicate a request has been made to create a configuration-backed resource.
 CreateResourceHistory persistCreateHistory(Subject user, int parentResourceId, int resourceTypeId, String createResourceName, PackageVersion packageVersion, Configuration deploymentTimeConfiguration)
          Persists a record in the resource history to indicate a request has been made to create an package-backed resource.
 DeleteResourceHistory persistDeleteHistory(Subject user, int resourceId)
          Persists a record in the resource history to indicate a request has been made to delete a resource.
 

Method Detail

completeCreateResource

void completeCreateResource(CreateResourceResponse response)
For documentation, see ResourceFactoryServerService.completeCreateResource(org.rhq.core.clientapi.agent.inventory.CreateResourceResponse) .


completeDeleteResourceRequest

void completeDeleteResourceRequest(DeleteResourceResponse response)
For documentation, see ResourceFactoryServerService.completeDeleteResourceRequest(org.rhq.core.clientapi.agent.inventory.DeleteResourceResponse) .


createResource

CreateResourceHistory createResource(Subject user,
                                     int parentResourceId,
                                     int newResourceTypeId,
                                     String newResourceName,
                                     Configuration pluginConfiguration,
                                     String packageName,
                                     String packageVersion,
                                     Integer architectureId,
                                     Configuration deploymentTimeConfiguration,
                                     InputStream packageBitStream)
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:
user - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
newResourceTypeId - identifies the type of resource being created
newResourceName - name of the resource being created
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 - machine formatted identifier of the specific version of the package
architectureId - ID of the architecture of the package, null indicates NoArch (any)
deploymentTimeConfiguration - dictates how the package will be deployed
packageBitStream - content of the package to create

createResource

CreateResourceHistory createResource(Subject user,
                                     int parentResourceId,
                                     int newResourceTypeId,
                                     String newResourceName,
                                     Configuration pluginConfiguration,
                                     String packageName,
                                     String packageVersion,
                                     Integer architectureId,
                                     Configuration deploymentTimeConfiguration,
                                     InputStream packageBitStream,
                                     Map<String,String> packageUploadDetails)

getCreateHistoryItem

CreateResourceHistory getCreateHistoryItem(int historyItemId)
Returns the history item corresponding to the specified ID.

Parameters:
historyItemId - identifies the history item to return
Returns:
history item for the id; null if the id does not have a corresponding item

getCreateChildResourceHistoryCount

int getCreateChildResourceHistoryCount(int parentResourceId,
                                       Long beginDate,
                                       Long endDate)
Returns the number of requests to create a new child resource under the specified parent known to the system. These requests may be completed or still in progress; it represents the history of creation attempts for this parent resource.

Parameters:
parentResourceId - resource to check for child resource creation requests
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
Returns:
number of requests in the resource creation history for the specified parent

getDeleteChildResourceHistoryCount

int getDeleteChildResourceHistoryCount(int parentResourceId,
                                       Long beginDate,
                                       Long endDate)
Returns the number of requests to delete a child resource from the specified parent resource. These requests may be complete or still in progress; it represents the history of all delete attempts of child resources to this resource.

Parameters:
parentResourceId - resource to check for child resource delete requests
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
Returns:
number of delete requests for child resources

persistCreateHistory

CreateResourceHistory persistCreateHistory(Subject user,
                                           int parentResourceId,
                                           int resourceTypeId,
                                           String createResourceName,
                                           Configuration configuration)
Persists a record in the resource history to indicate a request has been made to create a configuration-backed resource.

Parameters:
user - user performing the create
parentResourceId - parent resource under which the resource should be created
resourceTypeId - type of resource being created
createResourceName - name of the resource being created
configuration - resource configuration of the new resource
Returns:
persisted history entity (i.e. ID will be populated)

persistCreateHistory

CreateResourceHistory persistCreateHistory(Subject user,
                                           int parentResourceId,
                                           int resourceTypeId,
                                           String createResourceName,
                                           PackageVersion packageVersion,
                                           Configuration deploymentTimeConfiguration)
Persists a record in the resource history to indicate a request has been made to create an package-backed resource.

Parameters:
user - user performing the create
parentResourceId - parent resource under which the resource should be created
resourceTypeId - type of resource being created
createResourceName - name of the resource being created
packageVersion - package version being installed
deploymentTimeConfiguration - configuration of the package used when installing
Returns:
persisted history entity (i.e. ID will be populated)

persistDeleteHistory

DeleteResourceHistory persistDeleteHistory(Subject user,
                                           int resourceId)
Persists a record in the resource history to indicate a request has been made to delete a resource.

Parameters:
user - use performing the delete
resourceId - resource being deleted
Returns:
persisted history entity (i.e. ID will be populated)

checkForTimedOutRequests

void checkForTimedOutRequests()
Will check to see if any in progress resource creation jobs are taking too long to finish and if so marks them as failed. This method will be perodically called by the server.


createResource

CreateResourceHistory createResource(Subject subject,
                                     int parentResourceId,
                                     int resourceTypeId,
                                     String resourceName,
                                     Configuration pluginConfiguration,
                                     Configuration resourceConfiguration)
See Also:
ResourceFactoryManagerRemote.createResource(Subject,int,int,String,Configuration,Configuration)

createPackageBackedResource

CreateResourceHistory createPackageBackedResource(Subject subject,
                                                  int parentResourceId,
                                                  int newResourceTypeId,
                                                  String newResourceName,
                                                  Configuration pluginConfiguration,
                                                  String packageName,
                                                  String packageVersion,
                                                  Integer architectureId,
                                                  Configuration deploymentTimeConfiguration,
                                                  byte[] packageBits)
See Also:
ResourceFactoryManagerRemote.createPackageBackedResource(Subject,int,int,String,Configuration,String,String,Integer,Configuration,byte[])

createPackageBackedResourceViaPackageVersion

CreateResourceHistory createPackageBackedResourceViaPackageVersion(Subject subject,
                                                                   int parentResourceId,
                                                                   int newResourceTypeId,
                                                                   String newResourceName,
                                                                   Configuration pluginConfiguration,
                                                                   Configuration deploymentTimeConfiguration,
                                                                   int packageVersionId)

deleteResource

DeleteResourceHistory deleteResource(Subject subject,
                                     int resourceId)
See Also:
ResourceFactoryManagerRemote.deleteResource(Subject,int)

deleteResources

List<DeleteResourceHistory> deleteResources(Subject subject,
                                            int[] resourceIds)
See Also:
ResourceFactoryManagerRemote.deleteResources(Subject,int[])

findCreateChildResourceHistory

PageList<CreateResourceHistory> findCreateChildResourceHistory(Subject subject,
                                                               int parentResourceId,
                                                               Long beginDate,
                                                               Long endDate,
                                                               PageControl pageControl)

findDeleteChildResourceHistory

PageList<DeleteResourceHistory> findDeleteChildResourceHistory(Subject subject,
                                                               int parentResourceId,
                                                               Long beginDate,
                                                               Long endDate,
                                                               PageControl pageControl)


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