Search in sources :

Example 1 with ProductInfo

use of com.opentext.ia.sdk.dto.ProductInfo in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class ArchiveConnection method getServerVersion.

public String getServerVersion() throws IOException {
    if (serverVersion != null) {
        return serverVersion;
    }
    Services services = getServices();
    ProductInfo productInfo = getRestClient().follow(services, InfoArchiveLinkRelations.LINK_PRODUCT_INFO, ProductInfo.class);
    if (productInfo == null) {
        throw new IllegalStateException("Cannot determine server version");
    }
    serverVersion = productInfo.getBuildProperties().getServerVersion();
    return serverVersion;
}
Also used : Services(com.opentext.ia.sdk.dto.Services) ProductInfo(com.opentext.ia.sdk.dto.ProductInfo)

Example 2 with ProductInfo

use of com.opentext.ia.sdk.dto.ProductInfo in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class ArchiveClients method appResourceCache.

private static ApplicationIngestionResourcesCache appResourceCache(String applicationName, ArchiveConnection connection, RestClient restClient) throws IOException {
    ApplicationIngestionResourcesCache resourceCache = new ApplicationIngestionResourcesCache(applicationName);
    Services services = connection.getServices();
    ProductInfo productInfo = getProductInfo(restClient, services);
    Tenant tenant = getTenant(restClient, services);
    Application application = getApplication(restClient, tenant, applicationName);
    cacheResourceUris(restClient, services, productInfo, application, resourceCache);
    return resourceCache;
}
Also used : Services(com.opentext.ia.sdk.dto.Services) ProductInfo(com.opentext.ia.sdk.dto.ProductInfo) ApplicationIngestionResourcesCache(com.opentext.ia.sdk.client.impl.ApplicationIngestionResourcesCache) Tenant(com.opentext.ia.sdk.dto.Tenant) Application(com.opentext.ia.sdk.dto.Application)

Aggregations

ProductInfo (com.opentext.ia.sdk.dto.ProductInfo)2 Services (com.opentext.ia.sdk.dto.Services)2 ApplicationIngestionResourcesCache (com.opentext.ia.sdk.client.impl.ApplicationIngestionResourcesCache)1 Application (com.opentext.ia.sdk.dto.Application)1 Tenant (com.opentext.ia.sdk.dto.Tenant)1