mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Feature/acs 3560 discovery api for custom embedded workflow license (#1423)
* ACS-3555 Add license code for custom embedded workflow * ACS-3555 remove unused import * ACS-3560 Discovery API for custom embedded workflow license * ACS-3560 fix compilation error
This commit is contained in:
@@ -284,7 +284,8 @@ public class RepositoryInfo
|
||||
.setMaxDocs(licenseDescriptor.getMaxDocs())
|
||||
.setMaxUsers(licenseDescriptor.getMaxUsers())
|
||||
.setClusterEnabled(licenseDescriptor.isClusterEnabled())
|
||||
.setCryptodocEnabled(licenseDescriptor.isCryptodocEnabled());
|
||||
.setCryptodocEnabled(licenseDescriptor.isCryptodocEnabled())
|
||||
.setCustomEmbeddedWorkflowEnabled(licenseDescriptor.isCustomEmbeddedWorkflowEnabled());
|
||||
}
|
||||
|
||||
public Date getIssuedAt()
|
||||
@@ -343,6 +344,7 @@ public class RepositoryInfo
|
||||
private Long maxDocs;
|
||||
private boolean isClusterEnabled;
|
||||
private boolean isCryptodocEnabled;
|
||||
private boolean isCustomEmbeddedWorkflowEnabled;
|
||||
|
||||
public LicenseEntitlement()
|
||||
{
|
||||
@@ -392,6 +394,17 @@ public class RepositoryInfo
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getIsCustomEmbeddedWorkflowEnabled()
|
||||
{
|
||||
return isCustomEmbeddedWorkflowEnabled;
|
||||
}
|
||||
|
||||
public LicenseEntitlement setCustomEmbeddedWorkflowEnabled(boolean customEmbeddedWorkflowEnabled)
|
||||
{
|
||||
isCustomEmbeddedWorkflowEnabled = customEmbeddedWorkflowEnabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@@ -400,6 +413,7 @@ public class RepositoryInfo
|
||||
.append(", maxDocs=").append(maxDocs)
|
||||
.append(", isClusterEnabled=").append(isClusterEnabled)
|
||||
.append(", isCryptodocEnabled=").append(isCryptodocEnabled)
|
||||
.append(", isCustomEmbeddedWorkflowEnabled=").append(isCustomEmbeddedWorkflowEnabled)
|
||||
.append(']');
|
||||
return sb.toString();
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -177,6 +177,7 @@ public class DiscoveryApiTest extends AbstractSingleNetworkSiteTest
|
||||
assertEquals(1000L, entitlements.getMaxDocs().longValue());
|
||||
assertTrue(entitlements.getIsClusterEnabled());
|
||||
assertFalse(entitlements.getIsCryptodocEnabled());
|
||||
assertFalse(entitlements.getIsCustomEmbeddedWorkflowEnabled());
|
||||
|
||||
// Check status
|
||||
StatusInfo statusInfo = repositoryInfo.getStatus();
|
||||
@@ -297,11 +298,13 @@ public class DiscoveryApiTest extends AbstractSingleNetworkSiteTest
|
||||
assertEquals(1000L, entitlements.getMaxDocs().longValue());
|
||||
assertTrue(entitlements.getIsClusterEnabled());
|
||||
assertFalse(entitlements.getIsCryptodocEnabled());
|
||||
assertFalse(entitlements.getIsCustomEmbeddedWorkflowEnabled());
|
||||
|
||||
// Override entitlements
|
||||
when(licenseDescriptorMock.getMaxDocs()).thenReturn(null);
|
||||
when(licenseDescriptorMock.isClusterEnabled()).thenReturn(false);
|
||||
when(licenseDescriptorMock.isCryptodocEnabled()).thenReturn(true);
|
||||
when(licenseDescriptorMock.isCustomEmbeddedWorkflowEnabled()).thenReturn(true);
|
||||
|
||||
response = get("discovery", null, 200);
|
||||
|
||||
@@ -319,6 +322,7 @@ public class DiscoveryApiTest extends AbstractSingleNetworkSiteTest
|
||||
assertNull(entitlements.getMaxDocs());
|
||||
assertFalse(entitlements.getIsClusterEnabled());
|
||||
assertTrue(entitlements.getIsCryptodocEnabled());
|
||||
assertTrue(entitlements.getIsCustomEmbeddedWorkflowEnabled());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user