com.projectdarkstar.tools.dtc.service
Interface ConfigResourcesService


public interface ConfigResourcesService

This interface exposes operations that allow creating, updating, and deleting resource objects like the hardware resources and package library objects. It is intended to be a remote interface exposing a stateless session EJB3.0 bean.


Method Summary
 Long addHardwareResource(HardwareResourceDTO hardwareResource)
          Add a HardwareResource object to persistent storage based on the given hardwareResource.
 Long addHardwareResourceFamily(HardwareResourceFamilyDTO hardwareResourceFamily)
          Add a HardwareResourceFamily object to persistent storage based on the given hardwareResourceFamily
 Long addPkgLibrary(PkgLibraryDTO pkgLibrary, String tags)
          Add a PkgLibrary object based on the given pkgLibrary to persistent storage.
 void deleteHardwareResource(Long id)
          Remove the HardwareResource with the given id from persistent storage.
 void deleteHardwareResourceFamily(Long id)
          Remove the HardwareResourceFamily with the given id from persistent storage.
 void deletePkgLibrary(Long id)
          Remove the PkgLibrary with the given id from persistent storage.
 void updateHardwareResource(Long id, Map<String,Object> updates)
          Update the HardwareResource in storage with the given id.
 void updateHardwareResourceFamily(Long id, Map<String,Object> updates)
          Update the HardwareResourceFamily in storage with the given id.
 void updatePkgLibrary(Long id, Map<String,Object> updates)
          Update the PkgLibrary object with the given id.
 

Method Detail

addHardwareResource

Long addHardwareResource(HardwareResourceDTO hardwareResource)
                         throws DTCServiceException
Add a HardwareResource object to persistent storage based on the given hardwareResource.

Parameters:
hardwareResource - hardwareResource to create
Returns:
id of the newly persisted HardwareResource object
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

addHardwareResourceFamily

Long addHardwareResourceFamily(HardwareResourceFamilyDTO hardwareResourceFamily)
                               throws DTCServiceException
Add a HardwareResourceFamily object to persistent storage based on the given hardwareResourceFamily

Parameters:
hardwareResourceFamily - hardwareResourceFamily to create
Returns:
id of the newly persisted HardwareResourceFamily object
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

updateHardwareResource

void updateHardwareResource(Long id,
                            Map<String,Object> updates)
                            throws DTCServiceException
Update the HardwareResource in storage with the given id. The given Map of updates maps bean attribute names to values that are to be used for the updates.

Parameters:
id - id of the HardwareResource to update
updates - map of updates to use to update the HardwareResource
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

updateHardwareResourceFamily

void updateHardwareResourceFamily(Long id,
                                  Map<String,Object> updates)
                                  throws DTCServiceException
Update the HardwareResourceFamily in storage with the given id. The given Map of updates maps bean attribute names to values that are to be used for the updates.

Parameters:
id - id of the HardwareResourceFamily to update
updates - map of updates to use to update the HardwareResourceFamily
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

deleteHardwareResource

void deleteHardwareResource(Long id)
                            throws DTCServiceException
Remove the HardwareResource with the given id from persistent storage.

Parameters:
id - id of the HardwareResource to remove
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

deleteHardwareResourceFamily

void deleteHardwareResourceFamily(Long id)
                                  throws DTCServiceException
Remove the HardwareResourceFamily with the given id from persistent storage.

Parameters:
id - id of the HardwareResourceFamily to remove
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

addPkgLibrary

Long addPkgLibrary(PkgLibraryDTO pkgLibrary,
                   String tags)
                   throws DTCServiceException
Add a PkgLibrary object based on the given pkgLibrary to persistent storage. The given string of tags is a space and/or comma separated list of tags that are to be assigned to the PkgLibrary as PkgLibraryTag objects. If there is no PkgLibraryTag object for a given tag, one will automatically be created, otherwise, the already existing entity will be used.

Parameters:
pkgLibrary - pkgLibrary to add
tags - comma and/or space separated list of tags to assign to the library
Returns:
id of the newly created PkgLibrary
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

updatePkgLibrary

void updatePkgLibrary(Long id,
                      Map<String,Object> updates)
                      throws DTCServiceException
Update the PkgLibrary object with the given id. The given Map of updates maps bean attribute names to values that are to be used for the update.

Parameters:
id - id of the PkgLibrary to update
updates - map of updates to update the PkgLibrary
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException

deletePkgLibrary

void deletePkgLibrary(Long id)
                      throws DTCServiceException
Remove the PkgLibrary with the given id from persistent storage.

Parameters:
id - id of the PkgLibrary to remove
Throws:
com.projectdarkstar.tools.dtc.service.DTCServiceException
DTCServiceException


Copyright © 2013. All Rights Reserved.