Class ClientManagementLib


  • public final class ClientManagementLib
    extends Object
    This class contains all those functions that the User needs to interact with the system to register users, classes, namespaces...
    • Field Detail

      • CONFIGFILEPATH_ENV

        public static final String CONFIGFILEPATH_ENV
        Environment variable where configuration file can be specified.
        See Also:
        Constant Field Values
    • Method Detail

      • getManifestInfo

        public static String getManifestInfo()
        Get Manifest version
        Returns:
        Version of the library
      • initializeCMLib

        public static boolean initializeCMLib​(String configFilePathArg)
        Initialize connections with LM.
        Parameters:
        configFilePathArg - optional path of config file. If a null or empty string is provided, the method will try looking for it in the path defined by dataClayCLIENTCONFIG environment variable, or the default path CONFIGFILEPATH
        Returns:
        TRUE if connections were successfully initiliazed. FALSE, otherwise.
      • finishConnections

        public static void finishConnections()
                                      throws Exception
        Finish connections to server
        Throws:
        Exception - if some exception occurs
      • getDataClayClientLib

        public static ClientRuntime getDataClayClientLib()
        Get the common library
        Returns:
        The common lib
      • newAccount

        public static AccountID newAccount​(Account newAcc)
        This operation creates a new account in the system with the provided username.
        Parameters:
        newAcc - Specifications of account to create
        Returns:
        AccountID of the new account if the it was successfully created. Null otherwise.
      • getAccountID

        public static AccountID getAccountID​(String userName)
        Method that retrieves the id of an account given its user name
        Parameters:
        userName - Name of the user
        Returns:
        the id of Account class if the operation succeeds. null otherwise
        Throws:
        RemoteException - if some exception occurs
      • getNonAdminAccountList

        public static Set<AccountID> getNonAdminAccountList​(AccountID adminAccountID,
                                                            PasswordCredential adminCredential)
        Method that retrieves the list of non admin accounts registered in the system.
        Parameters:
        adminAccountID - ID of the account of the user that calls the operation
        adminCredential - Credential of the adminAccount provided
        Returns:
        IDs of existent accounts (admin not included)
      • newSession

        public static SessionID newSession​(AccountID accountID,
                                           PasswordCredential credential,
                                           Map<String,​StubInfo> stubsInfo,
                                           Set<String> dataSets,
                                           String dataSetForStore)
        This operation creates a new session
        Parameters:
        accountID - ID of the account that generates the session
        credential - credentials of the account
        stubsInfo - Stubs info to use in new Session
        dataSets - Accessible datasets for the session (user must have one data contract for each dataset)
        dataSetForStore - Dataset for store (dataset must be include among the dataSets)
        Returns:
        the Session ID of the new session
      • newSession

        public static SessionID newSession​(AccountID accountID,
                                           PasswordCredential credential,
                                           String classPathOfStubs,
                                           Set<String> dataSets,
                                           String dataSetForStore)
        This operation creates a new session
        Parameters:
        accountID - ID of the account that generates the session
        credential - credentials of the account
        classPathOfStubs - class path where stubs (interfaces in contracts) can be found
        dataSets - Accessible datasets for the session (user must have one data contract for each dataset)
        dataSetForStore - Dataset for store (dataset must be include among the dataSets)
        Returns:
        the Session ID of the new session
      • newSession

        public static SessionID newSession​(AccountID accountID,
                                           PasswordCredential credential,
                                           Set<ContractID> contracts,
                                           Set<String> dataSets,
                                           String dataSetForStore)
        This operation creates a new session
        Parameters:
        accountID - ID of the account that generates the session
        credential - credentials of the account
        contracts - All contracts to be used in the new session to be created
        dataSets - Accessible datasets for the session (user must have one data contract for each dataset)
        dataSetForStore - Dataset for store (dataset must be include among the dataSets)
        Returns:
        the Session ID of the new session
      • closeSession

        public static void closeSession()
        Finish session
      • publishAddress

        public static void publishAddress​(String hostname,
                                          int port)
        Configure LogicModule to give provided address in case external dataClays require to know how to access current dataClay
        Parameters:
        hostname - Hostname to be published (given to external dataClays)
        port - Port to be published
      • newNamespace

        public static NamespaceID newNamespace​(AccountID accountID,
                                               PasswordCredential credential,
                                               Namespace newNamespace)
        Method that creates a new namespace in the system. The account doing the action must have admin role.
        Parameters:
        accountID - the account id of the account or the responsible of the namespace
        credential - the credential of the account or the responsible of the namespace
        newNamespace - the new namespace
        Returns:
        the id of the new namespace if the operation succeeds. null otherwise
      • removeNamespace

        public static boolean removeNamespace​(AccountID accountID,
                                              PasswordCredential credential,
                                              String namespaceName)
        This method removes a namespace from the system by checking it has no active contract associated with it, and no classes registered on it.
        Parameters:
        accountID - the account id of the responsible of the namespace
        credential - credentials of the account
        namespaceName - the name of the namespace to be removed
        Returns:
        True if the namespace is the namespace is correctly removed. False otherwise.
      • getNamespaceID

        public static NamespaceID getNamespaceID​(AccountID accountID,
                                                 PasswordCredential credential,
                                                 String namespaceName)
        Retrieves the id of a namespace identified by name provided
        Parameters:
        accountID - ID of an account asking for the ID
        credential - credential of account
        namespaceName - Name of the namespace
        Returns:
        ID of the namespace or NULL if an error happened.
        Throws:
        RemoteException - If some exception occurs
      • getNamespaceLanguage

        public static CommonMessages.Langs getNamespaceLanguage​(AccountID accountID,
                                                                PasswordCredential credential,
                                                                String namespaceName)
        Retrieves the id of a namespace identified by name provided
        Parameters:
        accountID - ID of an account asking for the language
        credential - credential of account
        namespaceName - Name of the namespace
        Returns:
        ID of the namespace or NULL if an error happened.
        Throws:
        RemoteException - If some exception occurs
      • getNamespaces

        public static Set<String> getNamespaces​(AccountID accountID,
                                                PasswordCredential credential)
        Retrieves available namespaces from the account provided.
        Parameters:
        accountID - ID of the account retreiving the information.
        credential - Credentials of the account.
        Returns:
        set of namespaces names available from the account provided.
      • importInterface

        public static boolean importInterface​(AccountID accountID,
                                              PasswordCredential credential,
                                              NamespaceID namespaceID,
                                              ContractID contractID,
                                              InterfaceID interfaceID)
        Imports a class from a specific interface in a specific contract into the given namespace
        Parameters:
        accountID - ID of the account
        credential - credential of the account
        namespaceID - ID of the namespace where the class will be imported
        contractID - ID of the contract
        interfaceID - ID of the interface
        Returns:
        TRUE if the interface has been successuflly imported, FALSE otherwise
      • importContract

        public static boolean importContract​(AccountID accountID,
                                             PasswordCredential credential,
                                             NamespaceID namespaceID,
                                             ContractID contractID)
        Imports all the classes represented by the interfaces of the given contract into a specific namespace
        Parameters:
        accountID - ID of the account
        credential - credential of the account
        namespaceID - ID of the namespace where classes will be imported
        contractID - ID of the contract
        Returns:
        TRUE if the interface has been successuflly imported, FALSE otherwise
      • newDataSet

        public static DataSetID newDataSet​(AccountID accountID,
                                           PasswordCredential credential,
                                           DataSet dataSet)
        Method that creates a new namespace in the system. The account doing the action must have admin role.
        Parameters:
        accountID - the account id of the account or the responsible of the namespace
        credential - the credential of the account or the responsible of the namespace
        dataSet - the new dataset
        Returns:
        the id of the new namespace if the operation succeeds. null otherwise
      • removeDataset

        public static boolean removeDataset​(AccountID accountID,
                                            PasswordCredential credential,
                                            String datasetName)
        This method removes a dataset from the system by checking it has no active data contract associated with it, and no objects registered in it.
        Parameters:
        accountID - the account id of the responsible of the dataset (or admin)
        credential - credentials of the account
        datasetName - the name of the dataset to be removed
        Returns:
        True if the dataset is correctly removed. False otherwise.
      • getDatasetID

        public static DataSetID getDatasetID​(AccountID accountID,
                                             PasswordCredential credential,
                                             String datasetName)
        Retrieves the id of a dataset identified by name provided
        Parameters:
        accountID - ID of an account asking for the ID
        credential - credential of account
        datasetName - Name of the dataset
        Returns:
        ID of the dataset or NULL if an error happened.
      • getPublicDatasets

        public static Set<String> getPublicDatasets​(AccountID accountID,
                                                    PasswordCredential credential)
        Get all public datasets (which the account can be registered to)
        Parameters:
        accountID - id of the account performing request
        credential - credential of account performing request
        Returns:
        Set of names of public datasets
      • getAccountDatasets

        public static Set<String> getAccountDatasets​(AccountID accountID,
                                                     PasswordCredential credential)
        Get datasets provided by the given account
        Parameters:
        accountID - id of the account
        credential - credential of the account
        Returns:
        Set of names of account's datasets.
      • newClass

        public static Map<String,​MetaClass> newClass​(AccountID accountID,
                                                           PasswordCredential credentials,
                                                           String namespace,
                                                           String className,
                                                           String classPath,
                                                           String srcPath,
                                                           String libPath)
        This operation creates a new metaclass in the system of the provided className from the given classPath and associate it to the Namespace provided.
        Parameters:
        accountID - ID of the account of the user that calls the operation
        credentials - Credentials of the account provided
        namespace - Namespace in which to create the metaclass
        className - name of the class (packages included if necessary)
        classPath - class path of the class
        srcPath - path to the source files of the classes
        libPath - path to the libraries of the application (including dataclayClient)
        Returns:
        the information of all registered classes if the operation succeeds. null otherwise.
      • newClasses

        public static Map<String,​MetaClass> newClasses​(AccountID accountID,
                                                             PasswordCredential credentials,
                                                             String namespace,
                                                             Set<String> classNames,
                                                             String classPath,
                                                             String srcPath,
                                                             String libPath)
        This operation creates a new metaclass in the system for each class with name provided from the given classPath and associate it to the Namespace provided.
        Parameters:
        accountID - ID of the account of the user that calls the operation
        credentials - Credentials of the account provided
        namespace - Namespace in which to create the metaclass
        classNames - name of classes (packages included if necessary)
        classPath - class path of the classes
        srcPath - path to the source files of the classes
        libPath - path to the libraries of the application (including dataclayClient)
        Returns:
        the information of all registered classes if the operation succeeds. null otherwise.
      • generateSpecs

        public static Map<String,​MetaClass> generateSpecs​(String namespace,
                                                                String classPath,
                                                                Set<String> classNames)
        Generate Specifications of classes
        Parameters:
        namespace - Namespace of class to register
        classPath - Path in where classes are located
        classNames - Names of classes to analyze
        Returns:
        Specifications of classes
      • newClassInternal

        public static Map<String,​MetaClass> newClassInternal​(AccountID accountID,
                                                                   PasswordCredential credentials,
                                                                   Map<String,​MetaClass> newClasses,
                                                                   String classPath,
                                                                   String srcPath,
                                                                   String libPath)
        Internal function for newClass
        Parameters:
        accountID - ID of registrator
        credentials - Credentials
        newClasses - Specifications of classes to register
        classPath - Class path of new classes to register
        srcPath - path to the source files of the classes
        libPath - path to the libraries of the application (including dataclayClient)
        Returns:
        Registered classes
      • removeClass

        public static boolean removeClass​(AccountID accountID,
                                          PasswordCredential credential,
                                          NamespaceID namespaceID,
                                          String className)
        Method that removes a class from the specified namespace (either removing the imports or because it was actually created in the namespace)
        Parameters:
        accountID - ID of the account responsible of the namespace of the class
        credential - Credential of the account responsible of the namespace of the class
        namespaceID - ID of the namespace where the class is present
        className - name of the class to be removed from the namespace
        Returns:
        TRUE if it was successfully removed. FALSE, otherwise.
      • removeOperation

        public static boolean removeOperation​(AccountID accountID,
                                              PasswordCredential credential,
                                              NamespaceID namespaceID,
                                              String className,
                                              String operationSignature)
        Method that removes an operation from the specified namespace
        Parameters:
        accountID - ID of the account responsible of the namespace of the class containing the operation
        credential - Credential of the account responsible of the namespace of the class containing the operation
        namespaceID - ID of the namespace of the operation.
        className - name of the class of the operation
        operationSignature - signature of the operation.
        Returns:
        TRUE if it was successfully removed. FALSE, otherwise.
      • removeImplementation

        public static boolean removeImplementation​(AccountID accountID,
                                                   PasswordCredential credential,
                                                   NamespaceID namespaceID,
                                                   ImplementationID implementationID)
        Method that removes an implementation of a certain operation
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - ID of the namespace of the implementation
        implementationID - the id of the implementation
        Returns:
        TRUE if it was successfully removed. FALSE, otherwise.
      • getOperationID

        public static OperationID getOperationID​(AccountID accountID,
                                                 PasswordCredential credential,
                                                 NamespaceID namespaceID,
                                                 String className,
                                                 String operationSignature)
        Method that retrieves the id of an operation given its signature
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the ID of the namespace
        className - the name of the class
        operationSignature - signature of the operation
        Returns:
        the operation id if the operation succeeds. null otherwise.
      • getPropertyID

        public static PropertyID getPropertyID​(AccountID accountID,
                                               PasswordCredential credential,
                                               NamespaceID namespaceID,
                                               String className,
                                               String propertyName)
        Method that retrieves the id of a property given its signature
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the ID of the namespace
        className - the name of the class
        propertyName - the name of the property
        Returns:
        the id of the property if the operation succeeds. null otherwise
      • getClassID

        public static MetaClassID getClassID​(AccountID accountID,
                                             PasswordCredential credential,
                                             NamespaceID namespaceID,
                                             String className)
        Method that retrieves the id of a class given its name
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the ID of the namespace of the class
        className - the name of the class
        Returns:
        the id of the class if the operation succeeds. null otherwise
      • getClassInfo

        public static MetaClass getClassInfo​(AccountID accountID,
                                             PasswordCredential credential,
                                             NamespaceID namespaceID,
                                             String className)
        Method that retrieves the info of a class given its name.
        Parameters:
        accountID - the account of the responsible of the namespace.
        credential - the credentials of the account.
        namespaceID - the ID of the namespace of the class.
        className - the name of the class.
        Returns:
        the id of the class if the operation succeeds. null otherwise.
      • getClassesInfoInNamespace

        public static Map<MetaClassID,​MetaClass> getClassesInfoInNamespace​(AccountID accountID,
                                                                                 PasswordCredential credential,
                                                                                 NamespaceID namespaceID)
        Method that retrieves the info of the classes registered in a specific namespace.
        Parameters:
        accountID - the account of the responsible of the namespace.
        credential - the credentials of the account.
        namespaceID - the ID of the namespace of the class.
        Returns:
        The info of the classes registered in the given namespace.
      • newPrivateContract

        public static ContractID newPrivateContract​(AccountID proprietaryAccountID,
                                                    PasswordCredential proprietaryCredential,
                                                    Contract contract)
        Method to register a new private contract.
        Parameters:
        proprietaryAccountID - The account of the contract provider
        proprietaryCredential - The credential of the contract provider
        contract - The specification of a contract. It includes the interfaces that will be part of the contract, the date the contract starts (it becomes active), and the date the contract expires
        Returns:
        the contract id if the operation succeeds. null otherwise.
      • newPublicContract

        public static ContractID newPublicContract​(AccountID proprietaryAccountID,
                                                   PasswordCredential proprietaryCredential,
                                                   Contract contract)
        Method that registers a new contract
        Parameters:
        proprietaryAccountID - The account of the contract provider
        proprietaryCredential - The credential of the contract provider
        contract - The specification of a contract. It includes the interfaces that will be part of the contract, the date the contract starts (it becomes active), and the date the contract expires
        Returns:
        the contract id if the operation succeeds. null otherwise.
      • getContractOfDataClayProvider

        public static ContractID getContractOfDataClayProvider​(AccountID accountID,
                                                               PasswordCredential credential)
        Return all contracts info of public DataClay provider.
        Parameters:
        accountID - ID of the account querying.
        credential - Credential of the user.
        Returns:
        The info of the contracts of the namespace provider.
      • getContractsOfProvider

        public static Map<ContractID,​Contract> getContractsOfProvider​(AccountID accountID,
                                                                            PasswordCredential credential,
                                                                            NamespaceID namespaceID)
        Return all contracts info of the namespace provider.
        Parameters:
        accountID - ID of the account of the responsible of the namespace.
        credential - Credential of the user.
        namespaceID - ID of the namespace provider.
        Returns:
        The info of the contracts of the namespace provider.
      • getContractsOfApplicant

        public static Map<ContractID,​Contract> getContractsOfApplicant​(AccountID accountID,
                                                                             PasswordCredential credential)
        Return the info of all the contracts of the user (as applicant) specified.
        Parameters:
        accountID - ID of the account of the user.
        credential - Credential of the user.
        Returns:
      • getContractsOfApplicant

        public static Map<ContractID,​Contract> getContractsOfApplicant​(AccountID accountID,
                                                                             PasswordCredential credential,
                                                                             NamespaceID namespaceIDofProvider)
        Return the info of all the contracts of the user (as applicant) specified with the namespace provider specified.
        Parameters:
        accountID - ID of the account of the user.
        credential - Credential of the user.
        namespaceIDofProvider - ID of the namespace that provides the contracts to be retrieved.
        Returns:
        The info of the contracts of the user specified with the given namespace provider.
      • registerToPublicContract

        public static boolean registerToPublicContract​(AccountID accountID,
                                                       PasswordCredential credential,
                                                       ContractID contractID)
        Method to register an account to a contract
        Parameters:
        accountID - The account of the applicant for the contract
        credential - The credential of the applicant for the contract
        contractID - ID of the contract in which to register.
        Returns:
        TRUE if the account was successfully registered to contract. FALSE, otherwise.
      • registerToPublicContractOfNamespace

        public static ContractID registerToPublicContractOfNamespace​(AccountID accountID,
                                                                     PasswordCredential credential,
                                                                     NamespaceID namespaceID)
        Method to register an account to a contract
        Parameters:
        accountID - The account of the applicant for the contract
        credential - The credential of the applicant for the contract
        namespaceID - ID of the namespace to check for a public contract
        Returns:
        the contractID corresponding to the public contract of the namespace
      • getStubs

        public static Map<String,​byte[]> getStubs​(AccountID applicantAccountID,
                                                        PasswordCredential applicantCredential,
                                                        LinkedList<ContractID> contractsIDs)
        Method that allows to retrieve the stubs
        Parameters:
        applicantAccountID - the applicant of the contracts
        applicantCredential - the credentials of the applicant
        contractsIDs - the contracts ids of the user
        Returns:
        Byte arrays representing stubs and aspects
      • getAndStoreStubs

        public static Set<String> getAndStoreStubs​(AccountID applicantAccountID,
                                                   PasswordCredential applicantCredential,
                                                   LinkedList<ContractID> contractsIDs,
                                                   String targetDirectoryPath)
        Method that allows to retrieve the stubs and prototypes of the given contract and store them to certain directory
        Parameters:
        applicantAccountID - the applicant of the contracts
        applicantCredential - the credentials of the applicant
        contractsIDs - the contracts ids of the user
        targetDirectoryPath - the directory path where stubs are saved
        Returns:
        Set of name of classes of stubs stored
      • getAndStoreStubsForEnrichment

        public static boolean getAndStoreStubsForEnrichment​(AccountID applicantAccountID,
                                                            PasswordCredential applicantCredential,
                                                            LinkedList<ContractID> contractsIDs,
                                                            String targetDirectoryPath)
        Method that allows to retrieve the stubs FOR ENRICHMENT of the given contract and store them to certain directory
        Parameters:
        applicantAccountID - the applicant of the contracts
        applicantCredential - the credentials of the applicant
        contractsIDs - the contracts ids of the user
        targetDirectoryPath - the directory path where stubs are saved
        Returns:
        TRUE if it succeeds, FALSE otherwise
      • newInterface

        public static InterfaceID newInterface​(AccountID accountID,
                                               PasswordCredential credential,
                                               Interface interfaceSpec)
        Method that registers a new interface
        Parameters:
        accountID - the account of the responsible of the namespace of the class
        credential - the credentials of the account
        interfaceSpec - Interface specification
        Returns:
        ID of the new interface created or NULL if it failed.
      • removeInterface

        public static boolean removeInterface​(AccountID accountID,
                                              PasswordCredential credential,
                                              NamespaceID namespaceID,
                                              InterfaceID interfaceID)
        Method that removes a specific interface
        Parameters:
        accountID - the account of the responsible of the namespace of the interface
        credential - the credentials of the acount
        namespaceID - ID of the namespace of the interface
        interfaceID - the id of the interface to be removed
        Returns:
        TRUE if it was successfully removed. FALSE, otherwise.
      • performSetOfNewAccounts

        public static byte[] performSetOfNewAccounts​(AccountID adminID,
                                                     PasswordCredential credential,
                                                     byte[] yamlRequest)
        Call that performs a series of account creations, described by one YAML file.
        Parameters:
        adminID - The admin AccountID, in order to perform the newAccount calls.
        credential - The credential for admin account.
        yamlRequest - The YAML file containing the new accounts information.
        Returns:
        A YAML payload containing the ID for the new accounts.
      • performSetOfOperations

        public static byte[] performSetOfOperations​(AccountID performerID,
                                                    PasswordCredential credential,
                                                    byte[] yamlRequest)
        Call that performs a series of operations (user type), described by one YAML file.
        Parameters:
        performerID - The performer AccountID, user responsible for all the operations.
        credential - The credential for the performer account.
        yamlRequest - The YAML file containing the information for the set of operations.
        Returns:
        A YAML payload containing the new dataClay IDs, resulting from this call.
      • getInterfaceInfo

        public static Interface getInterfaceInfo​(AccountID accountID,
                                                 PasswordCredential credential,
                                                 InterfaceID interfaceID)
        Method that retrieves the info of the interface if the account is registered in a contract that contains it
        Parameters:
        accountID - ID of the account registered in a contract with the interface present
        credential - the credential of the account
        interfaceID - the ID of the interface to be retrieved
        Returns:
        info of the interface
      • newPrivateDataContract

        public static DataContractID newPrivateDataContract​(AccountID proprietaryAccountID,
                                                            PasswordCredential proprietaryCredential,
                                                            DataContract datacontract)
        Method to register a new private data contract.
        Parameters:
        proprietaryAccountID - The account of the contract provider
        proprietaryCredential - The credential of the contract provider
        datacontract - The specification of a contract. It includes the date the contract starts (it becomes active) and the date the contract expires
        Returns:
        the contract id if the operation succeeds. null otherwise.
      • newPublicDataContract

        public static DataContractID newPublicDataContract​(AccountID proprietaryAccountID,
                                                           PasswordCredential proprietaryCredential,
                                                           DataContract datacontract)
        Method that registers a new public data contract
        Parameters:
        proprietaryAccountID - The account of the contract provider
        proprietaryCredential - The credential of the contract provider
        datacontract - The specification of a contract. It includes the date the contract starts (it becomes active) and the date the contract expires
        Returns:
        the contract id if the operation succeeds. null otherwise.
      • getDataContractsOfProvider

        public static Map<DataContractID,​DataContract> getDataContractsOfProvider​(AccountID accountID,
                                                                                        PasswordCredential credential,
                                                                                        DataSetID datasetID)
        Return all contracts info of the dataset provider.
        Parameters:
        accountID - ID of the account of the responsible of the dataset.
        credential - Credential of the user.
        datasetID - ID of the dataset provider.
        Returns:
        The info of the contracts of the namespace provider.
      • getDataContractsOfApplicant

        public static Map<DataContractID,​DataContract> getDataContractsOfApplicant​(AccountID accountID,
                                                                                         PasswordCredential credential)
        Return the info of all the data contracts of the user (as applicant) specified.
        Parameters:
        accountID - ID of the account of the user.
        credential - Credential of the user.
        Returns:
      • getDataContractInfoOfApplicantWithProvider

        public static DataContract getDataContractInfoOfApplicantWithProvider​(AccountID accountID,
                                                                              PasswordCredential credential,
                                                                              DataSetID datasetIDofProvider)
        Return the info of all the data contracts of the user (as applicant) specified with the dataset provider specified.
        Parameters:
        accountID - ID of the account of the user.
        credential - Credential of the user.
        datasetIDofProvider - ID of the dataset that provides the contracts to be retrieved.
        Returns:
        The info of the data contracts of the user specified with the given dataset provider.
      • registerToPublicDataContract

        public static boolean registerToPublicDataContract​(AccountID accountID,
                                                           PasswordCredential credential,
                                                           DataContractID datacontractID)
        Method to register an account to a data contract
        Parameters:
        accountID - The account of the applicant for the data contract
        credential - The credential of the applicant for the data contract
        datacontractID - ID of the contract in which to register.
        Returns:
        TRUE if the account was successfully registered to data contract. FALSE, otherwise.
      • getExecutionEnvironmentsInfo

        public static Map<ExecutionEnvironmentID,​ExecutionEnvironment> getExecutionEnvironmentsInfo​(CommonMessages.Langs language,
                                                                                                          boolean forceUpdateCache)
        Method that retrieves the info of the execution environments of a specific language
        Parameters:
        language - language of the backends to be retrieved
        forceUpdateCache - Indicates cache of EEs must be updated
        Returns:
        info of the of the execution environments of a specific language, indexed by their ID
      • getBackendNames

        public static Set<String> getBackendNames​(AccountID accountID,
                                                  PasswordCredential credential,
                                                  CommonMessages.Langs backendLanguage)
        Method that retrieves the info of the registered backends assuming that they might have 1 storage location and/or 1 exec environment
        Parameters:
        accountID - ID of the account
        credential - credential of the account
        backendLanguage - Language of the backend.
        Returns:
        info of the registered backends indexed by their names
      • registerEventListenerImpl

        public static void registerEventListenerImpl​(AccountID accountID,
                                                     PasswordCredential credentials,
                                                     ECA eventListenerImpl)
        Register Event listener implementation i.e. method that must be executed every time a certain event (and its conditions) occurs.
        Parameters:
        accountID - ID of the account of the user registering event listener.
        credentials - Credentials of the user
        eventListenerImpl - Event listener implementation. The user must be the responsible of the implementation.
      • registerExternalDataClay

        public static DataClayInstanceID registerExternalDataClay​(String dcHost,
                                                                  int dcPort)
        Method that registers the info of a dataClay instance
        Parameters:
        dcHost - entry port host of the external dataClay
        dcPort - entry point port of the external dataClay
        Returns:
        ID of external registered dataClay.
      • registerExternalDataClayOverrideAuthority

        public static DataClayInstanceID registerExternalDataClayOverrideAuthority​(AccountID adminAccountID,
                                                                                   PasswordCredential adminCredential,
                                                                                   String dcHost,
                                                                                   int dcPort,
                                                                                   String authority)
        ADMIN usage only. Method that registers the info of a dataClay instance but with overriden authority for SSL connections.
        Parameters:
        adminAccountID - admin account id
        adminCredential - admin credentials
        dcHost - entry port host of the external dataClay
        dcPort - entry point port of the external dataClay
        authority - authority to use
        Returns:
        ID of external registered dataClay.
      • updateExternalDataClay

        public static void updateExternalDataClay​(DataClayInstanceID dcID,
                                                  String dcHost,
                                                  int dcPort)
        Method that updates the info of a dataClay instance (adds new "access")
        Parameters:
        dcID - ID of the dataclay to update
        dcHost - entry port host of the external dataClay
        dcPort - entry point port of the external dataClay
      • getExternalDataClayID

        public static DataClayInstanceID getExternalDataClayID​(String dcHost,
                                                               int dcPort)
        Tries to connect to an external dataClay instance and retrieve its ID. *
        Parameters:
        dcHost - hostname of the external dataClay instance
        dcPort - port of the external dataClay instance
        Returns:
        id of the external dataClay instance
      • getDataClayID

        public static DataClayInstanceID getDataClayID()
        Method that retrieves the current dataClay identifier
        Returns:
        id of the current dataClay (current dataClay is which this clientLib is being connected to)
      • importModelsFromExternalDataClay

        public static void importModelsFromExternalDataClay​(String externalNamespace,
                                                            DataClayInstanceID extDataClayID)
        Import classes in namespace specified from an external dataClay
        Parameters:
        externalNamespace - External namespace to get
        extDataClayID - External dataClay ID
      • activateTracingInDataClayServices

        public static final void activateTracingInDataClayServices()
        Activate tracing in dataClay services
      • deactivateTracingInDataClayServices

        public static final void deactivateTracingInDataClayServices()
        Dectivate tracing
      • activateTracing

        public static final void activateTracing​(boolean initializeWrapper)
        Activate tracing
      • deactivateTracing

        public static final void deactivateTracing​(boolean finalizeWrapper)
        Deactivate tracing
      • getTracesInDataClayServices

        public static final void getTracesInDataClayServices()
        Get traces in dataClay services and store it in current workspace
      • waitForAsyncRequestToFinish

        public static void waitForAsyncRequestToFinish()
        Wait for asynchronous requests to finish.