Interface I_SystemAccess
-
- All Superinterfaces:
I_SimpleCRUD
- All Known Implementing Classes:
SystemAccess
public interface I_SystemAccess extends I_SimpleCRUD
System access layer interface.- Since:
- 1.0
- Author:
- Christian Chevalley, Jake Smolka
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static UUIDcreateOrRetrieveInstanceId(I_DomainAccess domainAccess, String description, String settings)Try to retrieve system with given input.static UUIDcreateOrRetrieveLocalSystem(I_DomainAccess domainAccess)Helper to retrieve or storeComposition a local host identifier
the local settings is a combination of MAC address and hostname:
for example: 44-87-FC-A9-B4-B2|TEST-PC
if the system is not yet in the DB it is created, it is retrieved otherwisestatic Integerdelete(I_DomainAccess domainAccess, UUID id)StringgetDescription()UUIDgetId()static I_SystemAccessgetInstance(I_DomainAccess domainAccess, String description, String settings)StringgetSettings()static I_SystemAccessretrieveInstance(I_DomainAccess domainAccess, UUID id)retrieve a system entry by its Idstatic UUIDretrieveInstanceId(I_DomainAccess domainAccess, String settings)retrieve the Id of a system by name (or settings)
-
-
-
Method Detail
-
getInstance
static I_SystemAccess getInstance(I_DomainAccess domainAccess, String description, String settings)
-
retrieveInstance
static I_SystemAccess retrieveInstance(I_DomainAccess domainAccess, UUID id)
retrieve a system entry by its Id- Parameters:
domainAccess- SQL accessid- UUID- Returns:
- UUID
-
retrieveInstanceId
static UUID retrieveInstanceId(I_DomainAccess domainAccess, String settings)
retrieve the Id of a system by name (or settings)- Parameters:
domainAccess- SQL accesssettings- a string describing the system (arbitrary convention)- Returns:
- UUID or null if not found
- Throws:
IllegalArgumentException- if couldn't retrieve instance with given settings
-
createOrRetrieveLocalSystem
static UUID createOrRetrieveLocalSystem(I_DomainAccess domainAccess)
Helper to retrieve or storeComposition a local host identifier
the local settings is a combination of MAC address and hostname:
for example: 44-87-FC-A9-B4-B2|TEST-PC
if the system is not yet in the DB it is created, it is retrieved otherwise- Returns:
- UUID of local system from DB
- Throws:
InternalServerException- when accessing network interface failed
-
createOrRetrieveInstanceId
static UUID createOrRetrieveInstanceId(I_DomainAccess domainAccess, String description, String settings)
Try to retrieve system with given input. If not available create instance.- Parameters:
domainAccess- Data Access Objectdescription- Optional description, can be NULL to use defaultsettings- a string describing the system (arbitrary convention)- Returns:
- UUID of system entry
-
delete
static Integer delete(I_DomainAccess domainAccess, UUID id)
-
getId
UUID getId()
-
getSettings
String getSettings()
-
getDescription
String getDescription()
-
-