use of org.alfresco.cmis.client.type.AlfrescoType in project alfresco-remote-api by Alfresco.
the class TestCMIS method testMNT10430.
@Test
public void testMNT10430() throws Exception {
final TestNetwork network1 = getTestFixture().getRandomNetwork();
String username = "user" + System.currentTimeMillis();
PersonInfo personInfo = new PersonInfo(username, username, username, TEST_PASSWORD, null, null, null, null, null, null, null);
TestPerson person1 = network1.createUser(personInfo);
String person1Id = person1.getId();
publicApiClient.setRequestContext(new RequestContext(network1.getId(), person1Id));
CmisSession cmisSession = publicApiClient.createPublicApiCMISSession(Binding.browser, CMIS_VERSION_11, AlfrescoObjectFactoryImpl.class.getName());
ObjectType objectType = cmisSession.getTypeDefinition("D:testcmis:maDoc");
// try and get the mandatory aspects
List<String> mandatoryAspects = ((AlfrescoType) objectType).getMandatoryAspects();
System.out.println("Mandatory Aspects");
for (String mandatoryAspect : mandatoryAspects) {
System.out.println(mandatoryAspect);
}
assertTrue("The aspects should have P:cm:generalclassifiable", mandatoryAspects.contains("P:cm:generalclassifiable"));
}
Aggregations