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 Detail

      • retrieveInstance

        static I_SystemAccess retrieveInstance​(I_DomainAccess domainAccess,
                                               UUID id)
        retrieve a system entry by its Id
        Parameters:
        domainAccess - SQL access
        id - 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 access
        settings - 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 Object
        description - Optional description, can be NULL to use default
        settings - a string describing the system (arbitrary convention)
        Returns:
        UUID of system entry
      • getId

        UUID getId()
      • getSettings

        String getSettings()
      • getDescription

        String getDescription()