Compare commits

...

7 Commits

4 changed files with 37 additions and 5 deletions

View File

@@ -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();
}

View File

@@ -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

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2018 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
@@ -25,7 +25,6 @@
*/
package org.alfresco.repo.descriptor;
import java.security.Principal;
import java.util.Date;
import java.util.Properties;
@@ -125,6 +124,15 @@ public class DescriptorStartupLog extends AbstractLifecycleBean
{
msg += ", NO CLUSTER";
}
if(license.isCustomEmbeddedWorkflowEnabled())
{
msg += ", customEmbeddedWorkflow:enabled";
}
else
{
msg += ", NO CUSTOM EMBEDDED WORKFLOW";
}
String holder = license.getHolderOrganisation();
if (holder != null)

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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
@@ -139,6 +139,12 @@ public interface LicenseDescriptor
* @return <code>true</code> if the license allows cryptodoc
*/
boolean isCryptodocEnabled();
/**
* Does this license allow custom embedded workflows?
* @return <code>true</code> if the license allows custom embedded workflows
*/
boolean isCustomEmbeddedWorkflowEnabled();
/**
* ATS Transformation Server Expiry Date