mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD to DEV/caveatmarkdatatype:
114610: Merged BRANCHES/V2.3 to HEAD: 114007: (RECORD ONLY) ACE-4390 ([RM] Unable to Add User/Group to files / folders - form does not open) 114659: Removed warnings 114660: RM-2669 (Spike: Investigate RM Enterprise approach) 114661: RM-2669 (Spike: Investigate RM Enterprise approach) 114662: RM-2669 (Spike: Investigate RM Enterprise approach) 114676: Updated Alfresco dependency to 5.1.b-EA 114677: Updated the svn:ignore list 114678: Removed a workaround which was causing problems with 5.1.a-EA 114680: Deleted .ant-targets-build.xml from the code base 114681: Added .ant-targets-build.xml to svn:ignore list 114685: Removed warnings 114777: RM-2394 Created another user with ALFRESCO_ADMINISTRATORS role to check that it wouldn't have its security clearance editable. Created EditUserPage class that would allow the editing of users profiles on the UI (especially the adding to a Alfresco group). Changed the test "adminIsNotShown" name to adminSecurityClearanceIsNotEditable to be more accurate what is really tested. 114791: RM-2702 (RM HEAD does not work with Alfresco 5.1.b-EA) 114809: RM-2702 (RM HEAD does not work with Alfresco 5.1.b-EA) 114827: RM-2394 Review RM. 114903: Merged V2.3 to HEAD 114902: Merged V2.2 to V2.3 114900: Merged V2.2.1.x (2.2.1.3) to V2.2 114608: Merged DEV to V2.2.1.x 114604: MNT-14900 : Alfresco doesn't work with Records Management - Fixed the circular reference problem from Spring config xml using NonBlockingLazyInitTargetSource 114912: Merged V2.3 to HEAD 114905: Merged V2.2 to V2.3 114786: RM-2391 : The Audit Log GET requests have to verify first which user is logged in and to which data it has access. - Implemented final fix and added a unit test. 114922: Merged BRANCHES/V2.3 to HEAD: 114921: Merged BRANCHES/V2.2 to BRANCHES/V2.3: 114258: RM-2522 : Select "Download Zip" (rm-download-zip) on RM Transfer Target inside RM Transfer view throws 400 Bad Request: Node is not fileplan - used isFilePlan method from FilePlanService instead of old check 114917: Merged BRANCHES/V2.2.1.x to BRANCHES/V2.2: 114437: Merged DEV to V2.2.1.x 114241: MNT-14900 : Alfresco doesn't work with Records Management - Fixed problem with circular references during Spring dependency injection process 114605: Reverse merged V2.2.1.x <<< Need to use a different approach. >>> Merged DEV to V2.2.1.x 114241: MNT-14900 : Alfresco doesn't work with Records Management - Fixed problem with circular references during Spring dependency injection process 114609: (RECORD ONLY) Update version to 2.2.1.3 114687: (RECORD ONLY) Updated version to 2.2.1.3 and dependency.share.po.version to 4.2.5-SNAPSHOT in pom.xml files 115015: Added some info why we override a managed version of a dependency 115087: RM-2693 (Create RM Enterprise server AMP) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/caveatmarkdatatype@116451 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
fullBuildCommunity
|
|
||||||
fullBuildEnterprise
|
|
||||||
incrementalBuild
|
|
2
pom.xml
2
pom.xml
@@ -82,7 +82,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<alfresco.version>5.1.a-EA</alfresco.version>
|
<alfresco.version>5.1.b-EA</alfresco.version>
|
||||||
<app.war.location>${project.build.directory}/${webapp.id.name}.war</app.war.location>
|
<app.war.location>${project.build.directory}/${webapp.id.name}.war</app.war.location>
|
||||||
<alfresco.base.version>${alfresco.version}</alfresco.base.version>
|
<alfresco.base.version>${alfresco.version}</alfresco.base.version>
|
||||||
|
|
||||||
|
@@ -392,8 +392,12 @@
|
|||||||
<property name="proxyInterfaces">
|
<property name="proxyInterfaces">
|
||||||
<value>org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService</value>
|
<value>org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService</value>
|
||||||
</property>
|
</property>
|
||||||
<property name="target">
|
<property name="targetSource">
|
||||||
<ref bean="filePlanService"/>
|
<bean class="org.alfresco.config.NonBlockingLazyInitTargetSource">
|
||||||
|
<property name="targetBeanName">
|
||||||
|
<idref bean="filePlanService"/>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
<property name="interceptorNames">
|
<property name="interceptorNames">
|
||||||
<list>
|
<list>
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<alfresco.client.contextPath>/alfresco</alfresco.client.contextPath>
|
<alfresco.client.contextPath>/alfresco</alfresco.client.contextPath>
|
||||||
<alfresco.postgres.version>9.1-901.jdbc4</alfresco.postgres.version>
|
<alfresco.postgres.version>9.1-901.jdbc4</alfresco.postgres.version>
|
||||||
<alfresco.mysql.version>5.1.31</alfresco.mysql.version>
|
<alfresco.mysql.version>5.1.31</alfresco.mysql.version>
|
||||||
<alfresco.spring.webscripts>5.1.2</alfresco.spring.webscripts>
|
<alfresco.spring.webscripts>5.4</alfresco.spring.webscripts>
|
||||||
<webapp.id.name>alfresco</webapp.id.name>
|
<webapp.id.name>alfresco</webapp.id.name>
|
||||||
<webapp.id>${webapp.id.name}</webapp.id>
|
<webapp.id>${webapp.id.name}</webapp.id>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -83,6 +83,17 @@
|
|||||||
</suiteXmlFiles>
|
</suiteXmlFiles>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>test-jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
@@ -424,6 +435,11 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.extensions.surf</groupId>
|
<groupId>org.springframework.extensions.surf</groupId>
|
||||||
<artifactId>spring-webscripts</artifactId>
|
<artifactId>spring-webscripts</artifactId>
|
||||||
|
<!--
|
||||||
|
We are overriding a managed version of a dependency here.
|
||||||
|
This is need to be able to support different Alfresco
|
||||||
|
versions (i.e for the time being 5.0.2, 5.0.d and 5.1.b-EA)
|
||||||
|
-->
|
||||||
<version>${alfresco.spring.webscripts}</version>
|
<version>${alfresco.spring.webscripts}</version>
|
||||||
<classifier>tests</classifier>
|
<classifier>tests</classifier>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
|
@@ -921,7 +921,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( nodeRef != null &&
|
if(nodeRef != null && nodeService.exists(nodeRef) &&
|
||||||
!AccessStatus.ALLOWED.equals(
|
!AccessStatus.ALLOWED.equals(
|
||||||
capabilityService.getCapabilityAccessState(nodeRef, ACCESS_AUDIT_CAPABILITY)))
|
capabilityService.getCapabilityAccessState(nodeRef, ACCESS_AUDIT_CAPABILITY)))
|
||||||
{
|
{
|
||||||
|
@@ -128,19 +128,6 @@ public class ReferralAdminServiceImpl implements ReferralAdminService
|
|||||||
return metadataReferral;
|
return metadataReferral;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets the {@link MetadataReferral} which uses the specified {@code assocType}. */
|
|
||||||
private MetadataReferral getReferralForAssociation(QName assocType)
|
|
||||||
{
|
|
||||||
final MetadataReferral metadataReferral = registry.getReferralForAssociation(assocType);
|
|
||||||
|
|
||||||
if (metadataReferral == null)
|
|
||||||
{
|
|
||||||
throw new IllegalArgumentException("No " + MetadataReferral.class.getSimpleName() +
|
|
||||||
" configured for assocType " + assocType);
|
|
||||||
}
|
|
||||||
return metadataReferral;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public MetadataReferral detachReferrer(NodeRef referrer, QName aspectName)
|
@Override public MetadataReferral detachReferrer(NodeRef referrer, QName aspectName)
|
||||||
{
|
{
|
||||||
final MetadataReferral referral = registry.getReferralForAspect(aspectName);
|
final MetadataReferral referral = registry.getReferralForAspect(aspectName);
|
||||||
|
@@ -31,12 +31,16 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class ReferredMetadataException extends AlfrescoRuntimeException
|
public class ReferredMetadataException extends AlfrescoRuntimeException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = -6059777070036571486L;
|
||||||
|
|
||||||
public ReferredMetadataException(String msgId) { super(msgId); }
|
public ReferredMetadataException(String msgId) { super(msgId); }
|
||||||
public ReferredMetadataException(String msgId, Throwable cause) { super(msgId, cause); }
|
public ReferredMetadataException(String msgId, Throwable cause) { super(msgId, cause); }
|
||||||
|
|
||||||
/** This exception may be thrown when a {@link MetadataReferral} was incorrectly initialised. */
|
/** This exception may be thrown when a {@link MetadataReferral} was incorrectly initialised. */
|
||||||
public static class InvalidMetadataReferral extends ReferredMetadataException
|
public static class InvalidMetadataReferral extends ReferredMetadataException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = 8507076314709440295L;
|
||||||
|
|
||||||
public InvalidMetadataReferral(String msgId)
|
public InvalidMetadataReferral(String msgId)
|
||||||
{
|
{
|
||||||
super(msgId);
|
super(msgId);
|
||||||
@@ -46,6 +50,8 @@ public class ReferredMetadataException extends AlfrescoRuntimeException
|
|||||||
/** This exception may be thrown when a {@link MetadataReferral} already exists. */
|
/** This exception may be thrown when a {@link MetadataReferral} already exists. */
|
||||||
public static class MetadataReferralAlreadyExists extends ReferredMetadataException
|
public static class MetadataReferralAlreadyExists extends ReferredMetadataException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = 8119954252195817706L;
|
||||||
|
|
||||||
private final MetadataReferral metadataReferral;
|
private final MetadataReferral metadataReferral;
|
||||||
|
|
||||||
public MetadataReferralAlreadyExists(String msgId, MetadataReferral metadataReferral)
|
public MetadataReferralAlreadyExists(String msgId, MetadataReferral metadataReferral)
|
||||||
@@ -53,11 +59,18 @@ public class ReferredMetadataException extends AlfrescoRuntimeException
|
|||||||
super(msgId);
|
super(msgId);
|
||||||
this.metadataReferral = metadataReferral;
|
this.metadataReferral = metadataReferral;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MetadataReferral getMetadataReferral()
|
||||||
|
{
|
||||||
|
return this.metadataReferral;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A {@link MetadataReferral} has not been found. */
|
/** A {@link MetadataReferral} has not been found. */
|
||||||
public static class MetadataReferralNotFound extends ReferredMetadataException
|
public static class MetadataReferralNotFound extends ReferredMetadataException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = 8648089074801662142L;
|
||||||
|
|
||||||
public MetadataReferralNotFound(String msgId)
|
public MetadataReferralNotFound(String msgId)
|
||||||
{
|
{
|
||||||
super(msgId);
|
super(msgId);
|
||||||
@@ -67,6 +80,8 @@ public class ReferredMetadataException extends AlfrescoRuntimeException
|
|||||||
/** A referent Node has not been found. */
|
/** A referent Node has not been found. */
|
||||||
public static class ReferentNodeNotFound extends ReferredMetadataException
|
public static class ReferentNodeNotFound extends ReferredMetadataException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = -6003487925958374458L;
|
||||||
|
|
||||||
public ReferentNodeNotFound(String msgId)
|
public ReferentNodeNotFound(String msgId)
|
||||||
{
|
{
|
||||||
super(msgId);
|
super(msgId);
|
||||||
@@ -76,6 +91,8 @@ public class ReferredMetadataException extends AlfrescoRuntimeException
|
|||||||
/** Exception to report that chains of metadata referral are not currently supported. */
|
/** Exception to report that chains of metadata referral are not currently supported. */
|
||||||
public static class ChainedMetadataReferralUnsupported extends ReferredMetadataException
|
public static class ChainedMetadataReferralUnsupported extends ReferredMetadataException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = -2293262325447442964L;
|
||||||
|
|
||||||
private final List<NodeRef> existingReferrers;
|
private final List<NodeRef> existingReferrers;
|
||||||
|
|
||||||
public ChainedMetadataReferralUnsupported(String msgId, List<NodeRef> existingReferrers)
|
public ChainedMetadataReferralUnsupported(String msgId, List<NodeRef> existingReferrers)
|
||||||
@@ -101,6 +118,8 @@ public class ReferredMetadataException extends AlfrescoRuntimeException
|
|||||||
/** Exception to report that metadata referral is not supported for metadata defined on content types. */
|
/** Exception to report that metadata referral is not supported for metadata defined on content types. */
|
||||||
public static class TypeMetadataReferralUnsupported extends ReferredMetadataException
|
public static class TypeMetadataReferralUnsupported extends ReferredMetadataException
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = 7498707640089715503L;
|
||||||
|
|
||||||
public TypeMetadataReferralUnsupported(String msgId)
|
public TypeMetadataReferralUnsupported(String msgId)
|
||||||
{
|
{
|
||||||
super(msgId);
|
super(msgId);
|
||||||
|
@@ -104,7 +104,7 @@ public abstract class BaseTransferWebScript extends StreamACP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ensure the node is a filePlan object
|
// ensure the node is a filePlan object
|
||||||
if (!TYPE_FILE_PLAN.equals(this.nodeService.getType(filePlan)))
|
if (!filePlanService.isFilePlan(filePlan))
|
||||||
{
|
{
|
||||||
status.setCode(HttpServletResponse.SC_BAD_REQUEST,
|
status.setCode(HttpServletResponse.SC_BAD_REQUEST,
|
||||||
"Node " + filePlan.toString() + " is not a file plan");
|
"Node " + filePlan.toString() + " is not a file plan");
|
||||||
|
@@ -141,6 +141,55 @@ public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase
|
|||||||
}, ADMIN_USER);
|
}, ADMIN_USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test getAuditTrail method to check that deleted items always show in the audit.
|
||||||
|
*
|
||||||
|
* @see RM-2391 (last addressed isue)
|
||||||
|
*/
|
||||||
|
public void testGetAuditTrailForDeletedItem()
|
||||||
|
{
|
||||||
|
// We have only one entry for the event "audit.start":
|
||||||
|
List<RecordsManagementAuditEntry> entries = getAuditTrail(1, ADMIN_USER);
|
||||||
|
|
||||||
|
assertEquals(entries.get(0).getEvent(), "audit.start");
|
||||||
|
|
||||||
|
// Event "audit.view" was generated but will be visible on the next call to getAuditTrail().
|
||||||
|
|
||||||
|
// Make a change:
|
||||||
|
updateTitle(filePlan, ADMIN_USER); // event=Update RM Object
|
||||||
|
|
||||||
|
// Show the audit has been updated; at this point we have three entries for the three events up to now:
|
||||||
|
// "audit.start", "audit.view" and "Update RM Object";
|
||||||
|
entries = getAuditTrail(3, ADMIN_USER);
|
||||||
|
|
||||||
|
assertEquals(entries.get(0).getEvent(), "audit.start");
|
||||||
|
assertEquals(entries.get(1).getEvent(), "audit.view");
|
||||||
|
assertEquals(entries.get(2).getEvent(), "Update RM Object");
|
||||||
|
|
||||||
|
// New "audit.view" event was generated - will be visible on next getAuditTrail().
|
||||||
|
|
||||||
|
doTestInTransaction(new Test<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void run() throws Exception
|
||||||
|
{
|
||||||
|
nodeService.deleteNode(record);
|
||||||
|
List<RecordsManagementAuditEntry> entries = getAuditTrail(5, ADMIN_USER);
|
||||||
|
|
||||||
|
assertEquals(entries.get(0).getEvent(), "audit.start");
|
||||||
|
assertEquals(entries.get(1).getEvent(), "audit.view");
|
||||||
|
assertEquals(entries.get(2).getEvent(), "Update RM Object");
|
||||||
|
assertEquals(entries.get(3).getEvent(), "audit.view");
|
||||||
|
|
||||||
|
// Show the audit contains a reference to the deleted item:
|
||||||
|
assertEquals(entries.get(4).getEvent(), "Delete RM Object");
|
||||||
|
assertEquals(entries.get(4).getNodeRef(), record);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test getAuditTrail method and parameter filters.
|
* Test getAuditTrail method and parameter filters.
|
||||||
*/
|
*/
|
||||||
|
@@ -18,21 +18,24 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.referredmetadata;
|
package org.alfresco.module.org_alfresco_module_rm.referredmetadata;
|
||||||
|
|
||||||
import static java.util.Collections.emptyMap;
|
|
||||||
import static java.util.Arrays.asList;
|
import static java.util.Arrays.asList;
|
||||||
import static org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.ReferentNodeNotFound;
|
import static java.util.Collections.emptyMap;
|
||||||
import static org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.MetadataReferralNotFound;
|
|
||||||
import static org.alfresco.module.org_alfresco_module_rm.test.util.ExceptionUtils.expectedException;
|
import static org.alfresco.module.org_alfresco_module_rm.test.util.ExceptionUtils.expectedException;
|
||||||
import static org.alfresco.module.org_alfresco_module_rm.test.util.FPUtils.asSet;
|
import static org.alfresco.module.org_alfresco_module_rm.test.util.FPUtils.asSet;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNull;
|
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.mockito.Mockito.any;
|
import static org.mockito.Matchers.any;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.eq;
|
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.MetadataReferralNotFound;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.ReferentNodeNotFound;
|
||||||
import org.alfresco.service.cmr.dictionary.ClassDefinition;
|
import org.alfresco.service.cmr.dictionary.ClassDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||||
@@ -47,10 +50,6 @@ import org.mockito.InjectMocks;
|
|||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.MockitoAnnotations;
|
import org.mockito.MockitoAnnotations;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit tests for {@link ReferredMetadataServiceImpl}.
|
* Unit tests for {@link ReferredMetadataServiceImpl}.
|
||||||
*
|
*
|
||||||
@@ -96,6 +95,7 @@ public class ReferredMetadataServiceImplUnitTest
|
|||||||
this.setAspects(asSet(referredAspect1, referredAspect2));
|
this.setAspects(asSet(referredAspect1, referredAspect2));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
@Before public void setUp()
|
@Before public void setUp()
|
||||||
{
|
{
|
||||||
MockitoAnnotations.initMocks(this);
|
MockitoAnnotations.initMocks(this);
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.script.classification;
|
package org.alfresco.module.org_alfresco_module_rm.script.classification;
|
||||||
|
|
||||||
import static java.util.Collections.emptyMap;
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.mockito.Matchers.any;
|
import static org.mockito.Matchers.any;
|
||||||
@@ -34,8 +33,6 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationLevel;
|
import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationLevel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.classification.ClearanceLevel;
|
import org.alfresco.module.org_alfresco_module_rm.classification.ClearanceLevel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.classification.SecurityClearance;
|
import org.alfresco.module.org_alfresco_module_rm.classification.SecurityClearance;
|
||||||
@@ -50,7 +47,6 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.InjectMocks;
|
import org.mockito.InjectMocks;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -58,6 +54,9 @@ import org.mockito.Spy;
|
|||||||
import org.springframework.extensions.webscripts.DeclarativeWebScript;
|
import org.springframework.extensions.webscripts.DeclarativeWebScript;
|
||||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for get user security clearance API
|
* Test for get user security clearance API
|
||||||
*
|
*
|
||||||
|
@@ -44,6 +44,7 @@ public class FPUtils
|
|||||||
* @param <T> the type of elements in the list.
|
* @param <T> the type of elements in the list.
|
||||||
* @return the list with each element being the first retrieved from a {@code Supplier}.
|
* @return the list with each element being the first retrieved from a {@code Supplier}.
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> List<T> asListFrom(Supplier<T>... suppliers)
|
public static <T> List<T> asListFrom(Supplier<T>... suppliers)
|
||||||
{
|
{
|
||||||
if (suppliers == null || suppliers.length == 0)
|
if (suppliers == null || suppliers.length == 0)
|
||||||
@@ -66,6 +67,7 @@ public class FPUtils
|
|||||||
* @param <T> the type of elements in the set.
|
* @param <T> the type of elements in the set.
|
||||||
* @return the set with each element being the first retrieved from a {@code Supplier} (duplicates removed).
|
* @return the set with each element being the first retrieved from a {@code Supplier} (duplicates removed).
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> Set<T> asSetFrom(Supplier<T>... suppliers)
|
public static <T> Set<T> asSetFrom(Supplier<T>... suppliers)
|
||||||
{
|
{
|
||||||
List<T> l = asListFrom(suppliers);
|
List<T> l = asListFrom(suppliers);
|
||||||
@@ -78,6 +80,7 @@ public class FPUtils
|
|||||||
* @param objects the objects to be added to the set
|
* @param objects the objects to be added to the set
|
||||||
* @return a Set of objects (any equal objects will of course not be duplicated)
|
* @return a Set of objects (any equal objects will of course not be duplicated)
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> Set<T> asSet(T... objects)
|
public static <T> Set<T> asSet(T... objects)
|
||||||
{
|
{
|
||||||
return new HashSet<>(asList(objects));
|
return new HashSet<>(asList(objects));
|
||||||
|
Reference in New Issue
Block a user