mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'master' into feature/Update_Alfresco_Dependencies_5_2_d
Conflicts: pom.xml
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Localisation config overrides for Records Management module
|
||||
MESSAGE_SEARCH_PATH="rm-community/rm-community-repo/config rm-community/rm-community-share rm-community/rm-share/source rm-enterprise/rm-enterprise-repo/src/main rm-enterprise/rm-enterprise-share/src/main "
|
||||
EXCLUDED_FILES="$EXCLUDED_FILES rm-method-security.properties springloaded.properties file-mapping.properties classified-content-notForTranslating.properties notForTranslating"
|
||||
EXCLUDED_FILES="$EXCLUDED_FILES rm-method-security.properties springloaded.properties file-mapping.properties classified-content-notForTranslating.properties notForTranslating version.properties"
|
||||
EXTENSION_PREFIX=-RM
|
||||
|
22
pom.xml
22
pom.xml
@@ -21,9 +21,9 @@
|
||||
</organization>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://gitlab.alfresco.com/records-management/records-management.git</connection>
|
||||
<developerConnection>scm:git:https://gitlab.alfresco.com/records-management/records-management.git</developerConnection>
|
||||
<url>https://gitlab.alfresco.com/records-management/records-management</url>
|
||||
<connection>scm:git:https://git.alfresco.com/records-management/records-management.git</connection>
|
||||
<developerConnection>scm:git:https://git.alfresco.com/records-management/records-management.git</developerConnection>
|
||||
<url>https://git.alfresco.com/records-management/records-management</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-internal</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
@@ -82,6 +82,18 @@
|
||||
<module>rm-automation</module>
|
||||
<module>rm-benchmark</module>
|
||||
</modules>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-internal</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>alfresco-private</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<maven.build.sourceVersion>1.8</maven.build.sourceVersion>
|
||||
<alfresco.rm.share>alfresco-rm-community-share</alfresco.rm.share>
|
||||
<alfresco.rm.repo>alfresco-rm-community-repo</alfresco.rm.repo>
|
||||
<tas.restapi.version>5.2.0-2</tas.restapi.version>
|
||||
<tas.restapi.version>5.2.0-7</tas.restapi.version>
|
||||
<fluent.json.version>2.0.0</fluent.json.version>
|
||||
</properties>
|
||||
|
||||
|
@@ -26,6 +26,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import org.alfresco.rest.requests.Node;
|
||||
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.FilePlanComponentAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.FilesAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.RMSiteAPI;
|
||||
@@ -33,6 +35,7 @@ import org.alfresco.rest.rm.community.requests.igCoreAPI.RMUserAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.RecordsAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.RestIGCoreAPI;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.model.RepoTestModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
@@ -68,6 +71,22 @@ public class RestAPIFactory
|
||||
return getRmRestWrapper().withIGCoreAPI();
|
||||
}
|
||||
|
||||
private RestCoreAPI getRestCoreAPI(UserModel userModel)
|
||||
{
|
||||
getRmRestWrapper().authenticateUser(userModel != null ? userModel : dataUser.getAdminUser());
|
||||
return getRmRestWrapper().withCoreAPI();
|
||||
}
|
||||
|
||||
public Node getNodeAPI(RepoTestModel model) throws Exception
|
||||
{
|
||||
return getRestCoreAPI(null).usingNode(model);
|
||||
}
|
||||
|
||||
public Node getNodeAPI(UserModel userModel, RepoTestModel model) throws Exception
|
||||
{
|
||||
return getRestCoreAPI(userModel).usingNode(model);
|
||||
}
|
||||
|
||||
public RMSiteAPI getRMSiteAPI()
|
||||
{
|
||||
return getRestIGCoreAPI(null).usingRMSite();
|
||||
|
@@ -109,5 +109,5 @@ public class FilePlanComponentProperties
|
||||
private Integer physicalSize;
|
||||
|
||||
@JsonProperty(value = PROPERTIES_RECORD_ID, required = false)
|
||||
private String recordId;
|
||||
private String rmIdentifier;
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
|
||||
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
|
||||
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
|
||||
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
|
||||
import static org.alfresco.rest.rm.community.util.PojoUtility.toJsonElectronicRecord;
|
||||
import static org.apache.commons.lang3.StringUtils.EMPTY;
|
||||
import static org.springframework.http.HttpMethod.DELETE;
|
||||
import static org.springframework.http.HttpMethod.GET;
|
||||
@@ -253,8 +254,7 @@ public class FilePlanComponentAPI extends RMModelRequest
|
||||
* to the request.
|
||||
*/
|
||||
RequestSpecBuilder builder = getRMRestWrapper().configureRequestSpec();
|
||||
JsonNode root = new ObjectMapper().readTree(toJson(electronicRecordModel));
|
||||
|
||||
JsonNode root = new ObjectMapper().readTree(toJsonElectronicRecord(electronicRecordModel));
|
||||
// add request fields
|
||||
Iterator<String> fieldNames = root.fieldNames();
|
||||
while (fieldNames.hasNext())
|
||||
|
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2017 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.util;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonUnwrapped;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentProperties;
|
||||
|
||||
/**
|
||||
* Mix class for FilePlanComponent POJO class
|
||||
* Mix-in annotations are: a way to associate annotations with classes
|
||||
* without modifying (target) classes themselves.
|
||||
*
|
||||
* @author Rodica Sutu
|
||||
* @since 2.6
|
||||
*/
|
||||
public abstract class FilePlanComponentMixIn
|
||||
{
|
||||
/**
|
||||
* Annotation used to indicate that a property should be serialized "unwrapped"
|
||||
* Its properties are instead included as properties of its containing Object
|
||||
*/
|
||||
@JsonUnwrapped
|
||||
abstract FilePlanComponentProperties getProperties();
|
||||
|
||||
}
|
@@ -34,6 +34,8 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponent;
|
||||
|
||||
/**
|
||||
* Utility class for creating the json object
|
||||
*
|
||||
@@ -71,4 +73,42 @@ public class PojoUtility
|
||||
return e.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converting object to JSON string for electronic records
|
||||
*
|
||||
* @param model The java object model to convert
|
||||
* @throws JsonProcessingException Throws exceptions if the given object doesn't match to the POJO class model
|
||||
*/
|
||||
public static String toJsonElectronicRecord(Object model) throws JsonProcessingException
|
||||
{
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
//inject the "mix-in" annotations from FilePlanComponentMix to
|
||||
// FilePlanComponent POJO class when converting to json
|
||||
mapper.addMixIn(FilePlanComponent.class, FilePlanComponentMixIn.class);
|
||||
|
||||
//include only values that differ from default settings to be included
|
||||
mapper.setSerializationInclusion(Include.NON_DEFAULT);
|
||||
try
|
||||
{
|
||||
|
||||
//return the json object
|
||||
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(model);
|
||||
|
||||
}
|
||||
catch (JsonGenerationException e)
|
||||
{
|
||||
return e.toString();
|
||||
}
|
||||
catch (JsonMappingException e)
|
||||
{
|
||||
return e.toString();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return e.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,8 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.FOLDER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.HOLD_CONTAINER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.HOLD_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.RECORD_CATEGORY_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.RECORD_FOLDER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.TRANSFER_CONTAINER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.TRANSFER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_CONTAINER_TYPE;
|
||||
@@ -146,8 +148,39 @@ public interface TestData
|
||||
{ UNFILED_RECORD_FOLDER_TYPE },
|
||||
{ HOLD_TYPE },
|
||||
{ TRANSFER_TYPE },
|
||||
{ FOLDER_TYPE },
|
||||
{ CONTENT_TYPE }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Data Provider with:
|
||||
* with the object types for creating a Record Folder
|
||||
*
|
||||
* @return file plan component alias
|
||||
*/
|
||||
@DataProvider
|
||||
public static Object[][] folderTypes()
|
||||
{
|
||||
return new Object[][] {
|
||||
{ RECORD_FOLDER_TYPE },
|
||||
{ FOLDER_TYPE }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Data Provider with:
|
||||
* with the object types for creating a Record Category
|
||||
*
|
||||
* @return file plan component alias
|
||||
*/
|
||||
@DataProvider
|
||||
public static Object[][] categoryTypes()
|
||||
{
|
||||
return new Object[][] {
|
||||
{ FOLDER_TYPE },
|
||||
{ RECORD_CATEGORY_TYPE }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponent;
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentContent;
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields;
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentProperties;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.FilePlanComponentAPI;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.testng.annotations.DataProvider;
|
||||
@@ -220,6 +221,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
// created record will have record identifier inserted in its name but will be prefixed with
|
||||
// the name it was created as
|
||||
assertTrue(electronicRecord.getName().startsWith(record.getName()));
|
||||
assertTrue(electronicRecord.getName().contains(electronicRecord.getProperties().getRmIdentifier()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,6 +253,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
// record will have record identifier inserted in its name but will for sure start with file name
|
||||
// and end with its extension
|
||||
assertTrue(electronicRecord.getName().startsWith(IMAGE_FILE.substring(0, IMAGE_FILE.indexOf("."))));
|
||||
assertTrue(electronicRecord.getName().contains(electronicRecord.getProperties().getRmIdentifier()));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -272,6 +275,11 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
.mimeType("text/plain")
|
||||
.build()
|
||||
)
|
||||
.properties(FilePlanComponentProperties
|
||||
.builder()
|
||||
.description(ELECTRONIC_RECORD_NAME)
|
||||
.build()
|
||||
)
|
||||
.relativePath(RELATIVE_PATH)
|
||||
.build();
|
||||
|
||||
@@ -283,6 +291,8 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
// get newly created electronic record and verify its properties
|
||||
assertTrue(filePlanComponentsAPI.getFilePlanComponent(recordCreated.getId())
|
||||
.getName().startsWith(ELECTRONIC_RECORD_NAME));
|
||||
assertTrue(filePlanComponentsAPI.getFilePlanComponent(recordCreated.getId())
|
||||
.getProperties().getDescription().equals(ELECTRONIC_RECORD_NAME));
|
||||
assertTrue(filePlanComponentsAPI.getFilePlanComponent(recordCreated.getParentId())
|
||||
.getName().equals(FOLDER_NAME));
|
||||
//get newly created electronic record using the relativePath
|
||||
|
@@ -44,6 +44,7 @@ import static org.springframework.http.HttpStatus.FORBIDDEN;
|
||||
import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -142,6 +143,7 @@ public class NonElectronicRecordTests extends BaseRMRestTest
|
||||
String file = "File " + getRandomAlphanumeric();
|
||||
String shelf = "Shelf " + getRandomAlphanumeric();
|
||||
String location = "Location " + getRandomAlphanumeric();
|
||||
String name = "Record " + getRandomAlphanumeric();
|
||||
|
||||
Random random = new Random();
|
||||
Integer copies = random.nextInt(Integer.MAX_VALUE);
|
||||
@@ -149,7 +151,7 @@ public class NonElectronicRecordTests extends BaseRMRestTest
|
||||
|
||||
// set values of all available properties for the non electronic records
|
||||
FilePlanComponent filePlanComponent = FilePlanComponent.builder()
|
||||
.name("Record " + getRandomAlphanumeric())
|
||||
.name(name)
|
||||
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
|
||||
.properties(FilePlanComponentProperties.builder()
|
||||
.title(title)
|
||||
@@ -183,6 +185,8 @@ public class NonElectronicRecordTests extends BaseRMRestTest
|
||||
assertEquals(location, nonElectronicRecord.getProperties().getLocation());
|
||||
assertEquals(copies, nonElectronicRecord.getProperties().getNumberOfCopies());
|
||||
assertEquals(size, nonElectronicRecord.getProperties().getPhysicalSize());
|
||||
assertTrue(nonElectronicRecord.getName().contains(nonElectronicRecord.getProperties().getRmIdentifier()));
|
||||
assertTrue(nonElectronicRecord.getName().contains(name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -178,6 +178,8 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
assertNotNull(recordWithContent.getContent().getEncoding());
|
||||
assertNotNull(recordWithContent.getContent().getMimeType());
|
||||
assertNotNull(recordWithContent.getAspectNames());
|
||||
assertFalse(recordWithContent.getName().equals(ELECTRONIC_RECORD_NAME));
|
||||
assertTrue(recordWithContent.getName().contains(recordWithContent.getProperties().getRmIdentifier()));
|
||||
assertStatusCode(OK);
|
||||
|
||||
//create non-electronic record
|
||||
@@ -196,6 +198,8 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
assertNotNull(nonElectronicRecord.getContent().getMimeType());
|
||||
assertNotNull(nonElectronicRecord.getAspectNames());
|
||||
assertEquals(nonElectronicRecord.getProperties().getDescription(), NONELECTRONIC_RECORD_NAME);
|
||||
assertFalse(nonElectronicRecord.getName().equals(NONELECTRONIC_RECORD_NAME));
|
||||
assertTrue(nonElectronicRecord.getName().contains(nonElectronicRecord.getProperties().getRmIdentifier()));
|
||||
assertStatusCode(OK);
|
||||
}
|
||||
|
||||
@@ -390,8 +394,9 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
assertFalse(filePlanComponent.getIsRecordFolder());
|
||||
assertFalse(filePlanComponent.getIsCategory());
|
||||
|
||||
//assertEquals(createdComponent.getName(), filePlanComponent.getName());
|
||||
assertTrue(filePlanComponent.getName().startsWith(createdComponent.getName()));
|
||||
//check the record name
|
||||
assertTrue(filePlanComponent.getName().equals(createdComponent.getName()));
|
||||
assertTrue(createdComponent.getName().contains(createdComponent.getProperties().getRmIdentifier()));
|
||||
assertEquals(createdComponent.getNodeType(), filePlanComponent.getNodeType());
|
||||
|
||||
}
|
||||
|
@@ -70,12 +70,21 @@ public class RecordCategoryTest extends BaseRMRestTest
|
||||
* Given that a file plan exists
|
||||
* When I ask the API to create a root record category
|
||||
* Then it is created as a root record category
|
||||
*
|
||||
*
|
||||
* Given that a file plan exists
|
||||
* When I use the API to create a folder (cm:folder type) into the fileplan
|
||||
* Then the folder is converted to rma:recordCategory
|
||||
* (see RM-4572 comments)
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
(
|
||||
description = "Create root category"
|
||||
description = "Create root category",
|
||||
dataProviderClass= TestData.class,
|
||||
dataProvider = "categoryTypes"
|
||||
)
|
||||
public void createCategoryTest() throws Exception
|
||||
public void createCategoryTest(String nodeType) throws Exception
|
||||
{
|
||||
String categoryName = "Category name " + getRandomAlphanumeric();
|
||||
String categoryTitle = "Category title " + getRandomAlphanumeric();
|
||||
@@ -83,7 +92,7 @@ public class RecordCategoryTest extends BaseRMRestTest
|
||||
// Build the record category properties
|
||||
FilePlanComponent recordCategory = FilePlanComponent.builder()
|
||||
.name(categoryName)
|
||||
.nodeType(RECORD_CATEGORY_TYPE)
|
||||
.nodeType(nodeType)
|
||||
.properties(
|
||||
FilePlanComponentProperties.builder()
|
||||
.title(categoryTitle)
|
||||
@@ -109,7 +118,7 @@ public class RecordCategoryTest extends BaseRMRestTest
|
||||
// Verify the returned file plan component properties
|
||||
FilePlanComponentProperties filePlanComponentProperties = filePlanComponent.getProperties();
|
||||
assertEquals(filePlanComponentProperties.getTitle(), categoryTitle);
|
||||
|
||||
assertNotNull(filePlanComponentProperties.getRmIdentifier());
|
||||
logger.info("Aspects: " + filePlanComponent.getAspectNames());
|
||||
}
|
||||
|
||||
@@ -316,6 +325,7 @@ public class RecordCategoryTest extends BaseRMRestTest
|
||||
|
||||
// Verify properties
|
||||
// FIXME: Verify properties
|
||||
assertNotNull(createdComponent.getProperties().getRmIdentifier());
|
||||
}
|
||||
catch (NoSuchElementException e)
|
||||
{
|
||||
@@ -336,7 +346,7 @@ public class RecordCategoryTest extends BaseRMRestTest
|
||||
dataProvider = "childrenNotAllowedForCategory"
|
||||
|
||||
)
|
||||
@Bug (id="RM-4367")
|
||||
@Bug (id="RM-4367, RM-4572")
|
||||
public void createTypesNotAllowedInCategory(String nodeType) throws Exception
|
||||
{
|
||||
String COMPONENT_NAME = "Component"+getRandomAlphanumeric();
|
||||
|
@@ -74,12 +74,21 @@ public class RecordFolderTests extends BaseRMRestTest
|
||||
* Given that a record category exists
|
||||
* When I use the API to create a new record folder
|
||||
* Then it is created within the record category
|
||||
*
|
||||
* Given that a record category exists
|
||||
* When I use the API to create a folder (cm:folder type)
|
||||
* Then the folder is converted to rma:recordFolder within the record category
|
||||
* (see RM-4572 comments)
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
(
|
||||
description = "Create a folder into a record category"
|
||||
description = "Create a folder into a record category.",
|
||||
dataProviderClass = TestData.class,
|
||||
dataProvider = "folderTypes"
|
||||
)
|
||||
public void createFolderTest() throws Exception
|
||||
@Bug (id = "RM-4572")
|
||||
public void createFolderTest(String folderType) throws Exception
|
||||
{
|
||||
String CATEGORY = CATEGORY_NAME + getRandomAlphanumeric();
|
||||
|
||||
@@ -88,7 +97,7 @@ public class RecordFolderTests extends BaseRMRestTest
|
||||
|
||||
FilePlanComponent recordFolder = FilePlanComponent.builder()
|
||||
.name(FOLDER_NAME)
|
||||
.nodeType(RECORD_FOLDER_TYPE)
|
||||
.nodeType(folderType)
|
||||
.properties(FilePlanComponentProperties.builder()
|
||||
.title(FOLDER_TITLE)
|
||||
.build())
|
||||
@@ -113,6 +122,7 @@ public class RecordFolderTests extends BaseRMRestTest
|
||||
// Verify the returned file plan component properties
|
||||
FilePlanComponentProperties folderProperties = folder.getProperties();
|
||||
assertEquals(folderProperties.getTitle(), FOLDER_TITLE);
|
||||
assertNotNull(folderProperties.getRmIdentifier());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -39,6 +39,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil;
|
||||
import org.alfresco.rest.model.RestNodeModel;
|
||||
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponent;
|
||||
import org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentEntry;
|
||||
@@ -125,23 +126,23 @@ public class DeclareDocumentAsRecordTests extends BaseRMRestTest
|
||||
assertEquals(matchingRecords.size(), 1, "More than one record matching document name");
|
||||
|
||||
// verify the original file in collaboration site has been renamed to reflect the record identifier
|
||||
// FIXME: this call uses the FilePlanComponentAPI due to no TAS support for Node API in TAS restapi v 5.2.0-0. See RM-4585 for details.
|
||||
List<FilePlanComponentEntry> filesAfterRename = filePlanComponentAPI.listChildComponents(testFolder.getNodeRefWithoutVersion())
|
||||
List<RestNodeModel> filesAfterRename = getRestAPIFactory().getNodeAPI(testFolder)
|
||||
.listChildren()
|
||||
.getEntries()
|
||||
.stream()
|
||||
.filter(f -> f.getFilePlanComponentModel().getId().equals(document.getNodeRefWithoutVersion()))
|
||||
.filter(f -> f.onModel().getId().equals(document.getNodeRefWithoutVersion()))
|
||||
.collect(Collectors.toList());
|
||||
assertEquals(filesAfterRename.size(), 1, "There should be only one file in folder " + testFolder.getName());
|
||||
|
||||
// verify the new name has the form of "<original name> (<record Id>).<original extension>"
|
||||
assertEquals(filesAfterRename.get(0).getFilePlanComponentModel().getName(),
|
||||
document.getName().replace(".", String.format(" (%s).", record.getProperties().getRecordId())));
|
||||
String recordName = filesAfterRename.get(0).onModel().getName();
|
||||
assertEquals(recordName, document.getName().replace(".", String.format(" (%s).", record.getProperties().getRmIdentifier())));
|
||||
|
||||
// verify the document in collaboration site is now a record, note the file is now renamed hence folder + doc. name concatenation
|
||||
// this also verifies the document is still in the initial folder
|
||||
Document documentPostFiling = dataContent.usingSite(testSite)
|
||||
.usingUser(testUser)
|
||||
.getCMISDocument(testFolder.getCmisLocation() + "/" + filesAfterRename.get(0).getFilePlanComponentModel().getName());
|
||||
.getCMISDocument(testFolder.getCmisLocation() + "/" + recordName);
|
||||
|
||||
// a document is a record if "Record" is one of its secondary types
|
||||
List<SecondaryType> documentSecondary = documentPostFiling.getSecondaryTypes()
|
||||
@@ -185,12 +186,11 @@ public class DeclareDocumentAsRecordTests extends BaseRMRestTest
|
||||
assertStatusCode(FORBIDDEN);
|
||||
|
||||
// verify the document is still in the original folder
|
||||
// FIXME: this call uses the FilePlanComponentAPI due to no TAS support for Node API in TAS restapi v 5.2.0-0. See RM-4585 for details.
|
||||
List<FilePlanComponentEntry> filesAfterRename = getRestAPIFactory().getFilePlanComponentsAPI()
|
||||
.listChildComponents(testFolder.getNodeRefWithoutVersion())
|
||||
List<RestNodeModel> filesAfterRename = getRestAPIFactory().getNodeAPI(testFolder)
|
||||
.listChildren()
|
||||
.getEntries()
|
||||
.stream()
|
||||
.filter(f -> f.getFilePlanComponentModel().getId().equals(document.getNodeRefWithoutVersion()))
|
||||
.filter(f -> f.onModel().getId().equals(document.getNodeRefWithoutVersion()))
|
||||
.collect(Collectors.toList());
|
||||
assertEquals(filesAfterRename.size(), 1, "Declare as record failed but original document is missing");
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
<alfresco.version>5.2.e</alfresco.version>
|
||||
<share.version>5.2.d</share.version>
|
||||
<alfresco.version>5.2.f</alfresco.version>
|
||||
<share.version>5.2.e</share.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
@@ -28,7 +28,7 @@ rm.action.not-hold-type=Die Aktion kann nicht f\u00fcr {1} durchgef\u00fchrt wer
|
||||
rm.action.no-read-mime-message=Die Dateityp-Nachricht konnte nicht gelesen werden, da {0}.
|
||||
rm.action.email-declared=Die E-Mail konnte nicht geteilt werden, da der Record abgeschlossen ist. (actionedUponNodeRef={0})
|
||||
rm.action.email-not-record=Die E-Mail konnte nicht geteilt werden, da die Datei, der Ordner bzw. die Kategorie kein Record ist. (actionedUponNodeRef={0})
|
||||
rm.action.email-create-child-assoc=Benutzerdefinierte Kindzuordnung konnte nicht erstellt werden.
|
||||
rm.action.email-create-child-assoc=Benutzerdefinierte Unterordnung konnte nicht erstellt werden.
|
||||
rm.action.node-already-transfer=Datei, Ordner oder Kategorie wird bereits \u00fcbertragen.
|
||||
rm.action.node-not-transfer=Datei, Ordner oder Kategorie ist kein \u00dcbertragungsobjekt.
|
||||
rm.action.undo-not-last=Trennung kann nicht aufgehoben werden, da die letzte Aufbewahrungsaktion nicht getrennt wurde.
|
||||
|
@@ -28,7 +28,7 @@ rm.action.not-hold-type=Impossible d''effectuer l''action sur {1}, car ce n''est
|
||||
rm.action.no-read-mime-message=Le message filetype est illisible, car {0}.
|
||||
rm.action.email-declared=Impossible de partager l''e-mail, car le document d''archives n''est pas complet. (actionedUponNodeRef={0})
|
||||
rm.action.email-not-record=Impossible de partager l''e-mail, car le fichier, le dossier ou la cat\u00e9gorie n''est pas un document d''archives. (actionedUponNodeRef={0})
|
||||
rm.action.email-create-child-assoc=Impossible de cr\u00e9er une association d'enfant personnalis\u00e9e.
|
||||
rm.action.email-create-child-assoc=Impossible de cr\u00e9er une sous-association personnalis\u00e9e.
|
||||
rm.action.node-already-transfer=Le fichier, le dossier ou la cat\u00e9gorie est d\u00e9j\u00e0 en cours de transfert.
|
||||
rm.action.node-not-transfer=Le fichier, le dossier ou la cat\u00e9gorie n'est pas un objet de transfert.
|
||||
rm.action.undo-not-last=Impossible d'annuler le d\u00e9classement car la derni\u00e8re action de r\u00e9tention n'\u00e9tait pas un d\u00e9classement.
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=Der Record-Ordner konnte nicht geschlo
|
||||
rm.service.node-has-aspect=Record-Typ {1} wird bereits f\u00fcr Record {0} angezeigt.
|
||||
rm.service.final-version=Endg\u00fcltig
|
||||
rm.service.final-version-description=Die endg\u00fcltige archivierte Version des Records
|
||||
rm.service.enable-autoversion-on-record-creation=Automatische Versionsnummer bei Record-Erstellung
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=No se pudo cerrar la carpeta de docume
|
||||
rm.service.node-has-aspect=El tipo de documento de archivo ''{1}'' ya se est\u00e1 mostrando para el documento de archivo ''{0}''.
|
||||
rm.service.final-version=Final
|
||||
rm.service.final-version-description=La versi\u00f3n final del documento de archivo archivado
|
||||
rm.service.enable-autoversion-on-record-creation=Versi\u00f3n autom\u00e1tica al crear documento de archivo
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=Le dossier d''archives n''a pas pu \u0
|
||||
rm.service.node-has-aspect=Le type de document d''archives {1} est d\u00e9j\u00e0 affich\u00e9 pour le document d''archives {0}.
|
||||
rm.service.final-version=Finale
|
||||
rm.service.final-version-description=Version finale du document archiv\u00e9
|
||||
rm.service.enable-autoversion-on-record-creation=Version automatique lors de la cr\u00e9ation du document d'archives
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=Non \u00e8 stato possibile chiudere la
|
||||
rm.service.node-has-aspect=Il tipo di record {1} sta gi\u00e0 visualizzando per il record {0}.
|
||||
rm.service.final-version=Finale
|
||||
rm.service.final-version-description=Versione del record archiviata finale
|
||||
rm.service.enable-autoversion-on-record-creation=Versione automatica sulla creazione del record
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=\u3053\u306e\u30ec\u30b3\u30fc\u30c9\u
|
||||
rm.service.node-has-aspect=\u30ec\u30b3\u30fc\u30c9\u30bf\u30a4\u30d7 ''{1}'' \u306f\u3059\u3067\u306b\u30ec\u30b3\u30fc\u30c9 ''{0}'' \u306e\u3082\u306e\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002
|
||||
rm.service.final-version=\u6700\u7d42\u7248
|
||||
rm.service.final-version-description=\u30ec\u30b3\u30fc\u30c9\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u6e08\u307f\u6700\u7d42\u30d0\u30fc\u30b8\u30e7\u30f3
|
||||
rm.service.enable-autoversion-on-record-creation=\u30ec\u30b3\u30fc\u30c9\u306e\u4f5c\u6210\u6642\u306b\u81ea\u52d5\u30d0\u30fc\u30b8\u30e7\u30cb\u30f3\u30b0\u3092\u884c\u3046
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=Oppf\u00f8ringsmappen kan ikke lukkes
|
||||
rm.service.node-has-aspect=Oppf\u00f8ringstypen {1} vises allerede i oppf\u00f8ringen {0}.
|
||||
rm.service.final-version=Endelig
|
||||
rm.service.final-version-description=Den endelig arkiverte oppf\u00f8ringsversjonen
|
||||
rm.service.enable-autoversion-on-record-creation=Automatisk versjon om opprettelse av oppf\u00f8ringer
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=De archiefmap kan niet worden gesloten
|
||||
rm.service.node-has-aspect=Het recordtype {1} wordt al weergegeven voor record {0}.
|
||||
rm.service.final-version=Definitief
|
||||
rm.service.final-version-description=De definitieve gearchiveerde recordversie
|
||||
rm.service.enable-autoversion-on-record-creation=Automatische versie bij maken van record
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=N\u00e3o foi poss\u00edvel fechar a pa
|
||||
rm.service.node-has-aspect=O tipo de documento arquiv\u00edstico {1} j\u00e1 est\u00e1 sendo mostrado para o documento arquiv\u00edstico {0}.
|
||||
rm.service.final-version=Final
|
||||
rm.service.final-version-description=A vers\u00e3o do documento arquiv\u00edstico arquivado final
|
||||
rm.service.enable-autoversion-on-record-creation=Vers\u00e3o autom\u00e1tica na cria\u00e7\u00e3o de documento arquiv\u00edstico
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=\u041d\u0435\u0432\u043e\u0437\u043c\u
|
||||
rm.service.node-has-aspect=\u0417\u0430\u043f\u0438\u0441\u044c \u0442\u0438\u043f\u0430 {1} \u0443\u0436\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 {0}.
|
||||
rm.service.final-version=\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f
|
||||
rm.service.final-version-description=\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438
|
||||
rm.service.enable-autoversion-on-record-creation=\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0437\u0430\u043f\u0438\u0441\u0435\u0439
|
||||
|
@@ -19,3 +19,4 @@ rm.service.close-record-folder-not-folder=\u65e0\u6cd5\u5173\u95ed\u8bb0\u5f55\u
|
||||
rm.service.node-has-aspect=\u8bb0\u5f55\u7c7b\u578b {1} \u5df2\u4e3a\u8bb0\u5f55 {0} \u663e\u793a\u3002
|
||||
rm.service.final-version=\u6700\u7ec8
|
||||
rm.service.final-version-description=\u6700\u7ec8\u5b58\u6863\u7684\u8bb0\u5f55\u7248\u672c
|
||||
rm.service.enable-autoversion-on-record-creation=\u521b\u5efa\u8bb0\u5f55\u7684\u81ea\u52a8\u7248\u672c
|
||||
|
@@ -702,6 +702,13 @@
|
||||
<protected>true</protected>
|
||||
<mandatory>false</mandatory>
|
||||
</property>
|
||||
<!-- This aspect can only be used by the system to allow the rma:identifier to be explicitly set in the upload transaction -->
|
||||
<property name="rma:idIsTemporarilyEditable">
|
||||
<title>Record Component Identifier Temporarily Editable Indicator</title>
|
||||
<type>d:boolean</type>
|
||||
<protected>true</protected>
|
||||
<mandatory>false</mandatory>
|
||||
</property>
|
||||
</properties>
|
||||
<mandatory-aspects>
|
||||
<aspect>rma:filePlanComponent</aspect>
|
||||
|
@@ -43,7 +43,8 @@
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
<property name="dictionaryService" ref="DictionaryService"/>
|
||||
<property name="authenticationUtil" ref="rm.authenticationUtil"/>
|
||||
<property name='transactionalResourceHelper' ref="rm.transactionalResourceHelper" />
|
||||
<property name="transactionalResourceHelper" ref="rm.transactionalResourceHelper" />
|
||||
<property name="renditionService" ref="RenditionService" />
|
||||
</bean>
|
||||
|
||||
<!-- Records Management Service Registry -->
|
||||
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -1,3 +0,0 @@
|
||||
# RM Schema number
|
||||
|
||||
version.rm.schema=2501
|
@@ -126,6 +126,7 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel
|
||||
QName ASPECT_RECORD_COMPONENT_ID = QName.createQName(RM_URI, "recordComponentIdentifier");
|
||||
QName PROP_IDENTIFIER = QName.createQName(RM_URI, "identifier");
|
||||
QName PROP_DB_UNIQUENESS_ID = QName.createQName(RM_URI, "dbUniquenessId");
|
||||
QName PROP_ID_IS_TEMPORARILY_EDITABLE = QName.createQName(RM_URI, "idIsTemporarilyEditable");
|
||||
|
||||
// Vital record definition aspect
|
||||
QName ASPECT_VITAL_RECORD_DEFINITION = QName.createQName(RM_URI, "vitalRecordDefinition");
|
||||
|
@@ -47,6 +47,7 @@ import org.alfresco.repo.policy.annotation.BehaviourKind;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.service.cmr.attributes.AttributeService;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
@@ -64,6 +65,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
||||
public class RecordComponentIdentifierAspect extends BaseBehaviourBean
|
||||
implements NodeServicePolicies.OnUpdatePropertiesPolicy,
|
||||
NodeServicePolicies.BeforeDeleteNodePolicy,
|
||||
NodeServicePolicies.OnCreateNodePolicy,
|
||||
CopyServicePolicies.OnCopyCompletePolicy
|
||||
{
|
||||
/** I18N */
|
||||
@@ -127,7 +129,7 @@ public class RecordComponentIdentifierAspect extends BaseBehaviourBean
|
||||
if (newIdValue != null)
|
||||
{
|
||||
String oldIdValue = (String)before.get(PROP_IDENTIFIER);
|
||||
if (oldIdValue != null && !oldIdValue.equals(newIdValue))
|
||||
if (oldIdValue != null && !oldIdValue.equals(newIdValue) && !isRecordIdentifierEditable(nodeRef))
|
||||
{
|
||||
throw new IntegrityException(I18NUtil.getMessage(MSG_SET_ID, nodeRef.toString()), null);
|
||||
}
|
||||
@@ -140,6 +142,17 @@ public class RecordComponentIdentifierAspect extends BaseBehaviourBean
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method that checks if a record's identifier is temporarily editable
|
||||
* @param record the record to check
|
||||
* @return true if it is editable false otherwise
|
||||
*/
|
||||
private boolean isRecordIdentifierEditable(NodeRef record)
|
||||
{
|
||||
Boolean isEditableProperty = (Boolean)nodeService.getProperty(record, RecordsManagementModel.PROP_ID_IS_TEMPORARILY_EDITABLE);
|
||||
return isEditableProperty == null ? false : isEditableProperty;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up the {@link RecordsManagementModel#PROP_IDENTIFIER rma:identifier} property unique triplet.
|
||||
*
|
||||
@@ -230,7 +243,7 @@ public class RecordComponentIdentifierAspect extends BaseBehaviourBean
|
||||
// Do a blanket removal in case this is a contextual nodes
|
||||
attributeService.removeAttributes(CONTEXT_VALUE, nodeRef);
|
||||
}
|
||||
else
|
||||
else if(!beforeId.equals(afterId))
|
||||
{
|
||||
// This is a full update
|
||||
attributeService.updateOrCreateAttribute(
|
||||
@@ -238,4 +251,30 @@ public class RecordComponentIdentifierAspect extends BaseBehaviourBean
|
||||
CONTEXT_VALUE, contextNodeRef, afterId);
|
||||
}
|
||||
}
|
||||
|
||||
@Behaviour
|
||||
(
|
||||
kind = BehaviourKind.CLASS,
|
||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
||||
)
|
||||
@Override
|
||||
public void onCreateNode(final ChildAssociationRef childAssocRef)
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork()
|
||||
{
|
||||
/*
|
||||
* When creating a new record the identifier is writable to allow the upload in multiple steps.
|
||||
* On transaction commit make the identifier read only (remove the editable aspect).
|
||||
*/
|
||||
NodeRef newNode = childAssocRef.getChildRef();
|
||||
if(nodeService.exists(newNode))
|
||||
{
|
||||
nodeService.setProperty(newNode, RecordsManagementModel.PROP_ID_IS_TEMPORARILY_EDITABLE, false);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ package org.alfresco.module.org_alfresco_module_rm.model.rma.type;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.identifier.IdentifierService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean;
|
||||
@@ -213,6 +214,14 @@ public class FilePlanType extends BaseBehaviourBean
|
||||
@Override
|
||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
|
||||
{
|
||||
// We need to automatically cast the created folder to category if it is a plain folder
|
||||
// This occurs if the RM folder has been created via IMap, WebDav, etc. Don't check subtypes.
|
||||
// Some modules use hidden files to store information (see RM-3283)
|
||||
if (nodeService.getType(childAssocRef.getChildRef()).equals(ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
nodeService.setType(childAssocRef.getChildRef(), TYPE_RECORD_CATEGORY);
|
||||
}
|
||||
|
||||
// check the created child is of an accepted type
|
||||
validateNewChildAssociation(childAssocRef.getParentRef(), childAssocRef.getChildRef(), ACCEPTED_UNIQUE_CHILD_TYPES, ACCEPTED_NON_UNIQUE_CHILD_TYPES);
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean;
|
||||
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.security.FilePlanPermissionService;
|
||||
@@ -111,13 +112,22 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
)
|
||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
|
||||
{
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
NodeRef parentRef = childAssocRef.getParentRef();
|
||||
validateNewChildAssociation(parentRef, nodeRef, ACCEPTED_UNIQUE_CHILD_TYPES, ACCEPTED_NON_UNIQUE_CHILD_TYPES);
|
||||
QName childType = nodeService.getType(childAssocRef.getChildRef());
|
||||
|
||||
// We need to automatically cast the created folder to record folder if it is a plain folder
|
||||
// This occurs if the RM folder has been created via IMap, WebDav, etc. Don't check subtypes.
|
||||
// Some modules use hidden folders to store information (see RM-3283).
|
||||
if (childType.equals(ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
nodeService.setType(childAssocRef.getChildRef(), TYPE_RECORD_FOLDER);
|
||||
}
|
||||
|
||||
validateNewChildAssociation(childAssocRef.getParentRef(), childAssocRef.getChildRef(), ACCEPTED_UNIQUE_CHILD_TYPES, ACCEPTED_NON_UNIQUE_CHILD_TYPES);
|
||||
|
||||
if (bNew)
|
||||
{
|
||||
// setup the record folder
|
||||
recordFolderService.setupRecordFolder(nodeRef);
|
||||
recordFolderService.setupRecordFolder(childAssocRef.getChildRef());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,9 +142,9 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
policy = "alf:onCreateChildAssociation",
|
||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
||||
)
|
||||
public void onCreateChildAssociationOnCommit(ChildAssociationRef childAssocRef, boolean bNew)
|
||||
public void onCreateChildAssociationOnCommit(ChildAssociationRef childAssocRef, final boolean bNew)
|
||||
{
|
||||
final NodeRef recordCategory = childAssocRef.getChildRef();
|
||||
final NodeRef child = childAssocRef.getChildRef();
|
||||
|
||||
behaviourFilter.disableBehaviour();
|
||||
try
|
||||
@@ -145,7 +155,7 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
public Void doWork()
|
||||
{
|
||||
// setup vital record definition
|
||||
vitalRecordService.setupVitalRecordDefinition(recordCategory);
|
||||
vitalRecordService.setupVitalRecordDefinition(child);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.model.rma.type;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.identifier.IdentifierService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean;
|
||||
@@ -44,7 +43,6 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* rma:recordsManagementContainer behaviour bean.
|
||||
@@ -124,7 +122,8 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
@Behaviour
|
||||
(
|
||||
kind = BehaviourKind.ASSOCIATION,
|
||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT,
|
||||
// Execute on first event to make all type conversions and set all the properties before transaction ends and response is returned
|
||||
notificationFrequency = NotificationFrequency.EVERY_EVENT,
|
||||
name = BEHAVIOUR_NAME
|
||||
)
|
||||
public void onCreateChildAssociation(final ChildAssociationRef childAssocRef, boolean isNewNode)
|
||||
@@ -152,32 +151,6 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need to automatically cast the created folder to RM type if it is a plain folder
|
||||
// This occurs if the RM folder has been created via IMap, WebDav, etc
|
||||
if (!nodeService.hasAspect(child, ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
// Throw exception if the type is not cm:folder
|
||||
if (!ContentModel.TYPE_FOLDER.equals(childType))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CANNOT_CAST_TO_RM_TYPE));
|
||||
}
|
||||
// check the type of the parent to determine what 'kind' of artifact to create
|
||||
NodeRef parent = childAssocRef.getParentRef();
|
||||
QName parentType = nodeService.getType(parent);
|
||||
|
||||
if (dictionaryService.isSubClass(parentType, TYPE_FILE_PLAN))
|
||||
{
|
||||
// create a rma:recordCategoty since we are in the root of the file plan
|
||||
nodeService.setType(child, TYPE_RECORD_CATEGORY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// create a rma:recordFolder and initialise record folder
|
||||
nodeService.setType(child, TYPE_RECORD_FOLDER);
|
||||
recordFolderService.setupRecordFolder(child);
|
||||
}
|
||||
}
|
||||
|
||||
// Catch all to generate the rm id (assuming it doesn't already have one!)
|
||||
setIdenifierProperty(child);
|
||||
}
|
||||
@@ -223,8 +196,10 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) &&
|
||||
nodeService.getProperty(nodeRef, PROP_IDENTIFIER) == null)
|
||||
{
|
||||
// Generate identifier and leave it editable until the transaction ends
|
||||
String id = identifierService.generateIdentifier(nodeRef);
|
||||
nodeService.setProperty(nodeRef, RecordsManagementModel.PROP_IDENTIFIER, id);
|
||||
nodeService.setProperty(nodeRef, RecordsManagementModel.PROP_ID_IS_TEMPORARILY_EDITABLE, true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -44,6 +44,7 @@ import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.security.authority.RMAuthority;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.DuplicateChildNodeNameException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessPermission;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
@@ -520,7 +521,10 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
||||
String groupShortName = getIPRGroupShortName(groupNamePrefix, children, index);
|
||||
|
||||
// create group
|
||||
String group = authorityService.createAuthority(AuthorityType.GROUP, groupShortName, groupShortName, Collections.singleton(RMAuthority.ZONE_APP_RM));
|
||||
String group;
|
||||
try
|
||||
{
|
||||
group = authorityService.createAuthority(AuthorityType.GROUP, groupShortName, groupShortName, Collections.singleton(RMAuthority.ZONE_APP_RM));
|
||||
|
||||
// add root parent
|
||||
authorityService.addAuthority(getRootIRPGroup(), group);
|
||||
@@ -530,13 +534,18 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
for (String child : children)
|
||||
{
|
||||
if (authorityService.authorityExists(child) &&
|
||||
!PermissionService.ALL_AUTHORITIES.equals(child))
|
||||
if (authorityService.authorityExists(child) && !PermissionService.ALL_AUTHORITIES.equals(child))
|
||||
{
|
||||
authorityService.addAuthority(group, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(DuplicateChildNodeNameException ex)
|
||||
{
|
||||
// the group was concurrently created
|
||||
group = authorityService.getName(AuthorityType.GROUP, groupShortName);
|
||||
}
|
||||
|
||||
return group;
|
||||
}
|
||||
|
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2017 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.test.integration.issue;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.springframework.extensions.webscripts.GUID;
|
||||
|
||||
/**
|
||||
* Unit test for RM-4619
|
||||
*
|
||||
* When creating regular folders through clients that are not RM aware
|
||||
* the folders must be converted to the appropriate RM container
|
||||
*
|
||||
* @author Ana Bozianu
|
||||
* @since 2.6
|
||||
*/
|
||||
public class RM4619Test extends BaseRMTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Given the RM site is created
|
||||
* When we create a regular folder in the fileplan
|
||||
* Then the folder is immediately converted to a record category
|
||||
*/
|
||||
public void testConvertFolderToCategory() throws Exception
|
||||
{
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void run() throws Exception
|
||||
{
|
||||
FileInfo info = fileFolderService.create(filePlan, GUID.generate(), TYPE_FOLDER);
|
||||
assertEquals(info.getType(), TYPE_RECORD_CATEGORY);
|
||||
return null;
|
||||
}
|
||||
|
||||
}, ADMIN_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an existing category
|
||||
* When we create a regular folder in the category
|
||||
* Then the folder is immediately converted to a record folder
|
||||
*/
|
||||
public void testConvertFolderToRecordFolder() throws Exception
|
||||
{
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void run() throws Exception
|
||||
{
|
||||
FileInfo info = fileFolderService.create(rmContainer, GUID.generate(), TYPE_FOLDER);
|
||||
assertEquals(info.getType(), TYPE_RECORD_FOLDER);
|
||||
return null;
|
||||
}
|
||||
|
||||
}, ADMIN_USER);
|
||||
}
|
||||
}
|
@@ -218,10 +218,6 @@ public class ReportServiceImplTest extends BaseRMTestCase implements ReportModel
|
||||
|
||||
NodeRef recordFolder = recordFolderService.createRecordFolder(recordCategory, GUID.generate());
|
||||
|
||||
// Set the record folder identifier
|
||||
String identifier = identifierService.generateIdentifier(TYPE_RECORD_FOLDER, recordCategory);
|
||||
nodeService.setProperty(recordFolder, PROP_IDENTIFIER, identifier);
|
||||
|
||||
// Complete event
|
||||
Map<String, Serializable> params = new HashMap<String, Serializable>(1);
|
||||
params.put(CompleteEventAction.PARAM_EVENT_NAME, CommonRMTestUtils.DEFAULT_EVENT_NAME);
|
||||
|
@@ -27,11 +27,13 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.model.rma.type;
|
||||
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock;
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
|
||||
import org.alfresco.repo.node.integrity.IntegrityException;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.model.rma.type;
|
||||
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock;
|
||||
|
@@ -26,13 +26,11 @@
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.model.rma.type;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
|
||||
@@ -52,33 +50,10 @@ public class RecordsManagementContainerTypeUnitTest extends BaseUnitTest
|
||||
/** test object */
|
||||
private @InjectMocks RecordsManagementContainerType recordManagementContainerType;
|
||||
|
||||
/**
|
||||
* Having the Unfilled Record container and a folder
|
||||
* When adding a child association between the folder and the container
|
||||
* Then the folder type shouldn't be renamed
|
||||
*/
|
||||
@Test
|
||||
public void testAddFolderToRMContainer()
|
||||
{
|
||||
/* Having a RM container and a folder */
|
||||
NodeRef rmContainer = generateRMContainer();
|
||||
NodeRef rmFolder = generateFolderNode(false);
|
||||
|
||||
/*
|
||||
* When adding a child association between the folder and the container
|
||||
*/
|
||||
ChildAssociationRef childAssoc = new ChildAssociationRef(ContentModel.ASSOC_CONTAINS, rmContainer, ContentModel.ASSOC_CONTAINS, rmFolder);
|
||||
recordManagementContainerType.onCreateChildAssociation(childAssoc, true);
|
||||
|
||||
/* Then the node type should not be changed to TYPE_RECORD_FOLDER */
|
||||
verify(mockedNodeService).setType(rmFolder, TYPE_RECORD_FOLDER);
|
||||
verify(mockedRecordFolderService).setupRecordFolder(rmFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Having the Unfilled Record container and a folder having the aspect ASPECT_HIDDEN
|
||||
* When adding a child association between the folder and the container
|
||||
* Then the folder type shouldn't be renamed
|
||||
* Then the new folder should not be altered
|
||||
*/
|
||||
@Test
|
||||
public void testAddHiddenFolderToRMContainer()
|
||||
@@ -93,31 +68,9 @@ public class RecordsManagementContainerTypeUnitTest extends BaseUnitTest
|
||||
ChildAssociationRef childAssoc = new ChildAssociationRef(ContentModel.ASSOC_CONTAINS, rmContainer, ContentModel.ASSOC_CONTAINS, rmFolder);
|
||||
recordManagementContainerType.onCreateChildAssociation(childAssoc, true);
|
||||
|
||||
/* Then the node type should not be changed to TYPE_RECORD_FOLDER */
|
||||
verify(mockedNodeService, never()).setType(rmFolder, TYPE_RECORD_FOLDER);
|
||||
verify(mockedRecordFolderService, never()).setupRecordFolder(rmFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trying to create a RM folder and its sub-types via SFDC, IMap, WebDav, etc
|
||||
* Check that exception is thrown on creating child associations
|
||||
*/
|
||||
@Test
|
||||
public void testRM3450()
|
||||
{
|
||||
NodeRef rmContainer = generateRMContainer();
|
||||
NodeRef nonRmFolder = generateNonRmFolderNode();
|
||||
|
||||
ChildAssociationRef childAssoc = new ChildAssociationRef(ContentModel.ASSOC_CONTAINS, rmContainer, TestModel.NOT_RM_FOLDER_TYPE, nonRmFolder);
|
||||
try
|
||||
{
|
||||
recordManagementContainerType.onCreateChildAssociation(childAssoc, true);
|
||||
fail("Expected to throw exception on create child association.");
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
assertTrue(e instanceof AlfrescoRuntimeException);
|
||||
}
|
||||
/* The type should not be changed and no aspects should be added */
|
||||
verify(mockedNodeService, never()).setType(any(), any());
|
||||
verify(mockedNodeService, never()).addAspect(any(), any(), any());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -36,7 +36,7 @@ paths:
|
||||
operationId: getFileplanComponent
|
||||
parameters:
|
||||
- $ref: '#/parameters/fileplanComponentIdWithAliasParam'
|
||||
- $ref: '#/parameters/IGNodeEntryIncludeParam'
|
||||
- $ref: '#/parameters/FilePlanComponentEntryIncludeParam'
|
||||
- $ref: '#/parameters/relativePathParam'
|
||||
- $ref: '#/parameters/fieldsParam'
|
||||
produces:
|
||||
@@ -45,7 +45,7 @@ paths:
|
||||
'200':
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeEntry'
|
||||
$ref: '#/definitions/FilePlanComponentEntry'
|
||||
'400':
|
||||
description: |
|
||||
Invalid parameter: **fileplanComponentId** is not a valid format
|
||||
@@ -86,21 +86,21 @@ paths:
|
||||
operationId: updateFileplanComponent
|
||||
parameters:
|
||||
- $ref: '#/parameters/fileplanComponentIdWithAliasParam'
|
||||
- $ref: '#/parameters/IGNodeEntryIncludeParam'
|
||||
- $ref: '#/parameters/FilePlanComponentEntryIncludeParam'
|
||||
- $ref: '#/parameters/fieldsParam'
|
||||
- in: body
|
||||
name: nodeBodyUpdate
|
||||
description: The node information to update.
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeBodyUpdate'
|
||||
$ref: '#/definitions/FilePlanComponentBodyUpdate'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeEntry'
|
||||
$ref: '#/definitions/FilePlanComponentEntry'
|
||||
'400':
|
||||
description: |
|
||||
Invalid parameter: the update request is invalid or **fileplanComponentId** is not a valid format or **nodeBody** is invalid
|
||||
@@ -175,7 +175,7 @@ paths:
|
||||
- $ref: '#/parameters/maxItemsParam'
|
||||
- $ref: '#/parameters/orderByParam'
|
||||
- $ref: '#/parameters/whereParam'
|
||||
- $ref: '#/parameters/IGNodeEntryIncludeParam'
|
||||
- $ref: '#/parameters/FilePlanComponentEntryIncludeParam'
|
||||
- $ref: '#/parameters/relativePathParam'
|
||||
- $ref: '#/parameters/includeSourceParam'
|
||||
- $ref: '#/parameters/fieldsParam'
|
||||
@@ -183,7 +183,7 @@ paths:
|
||||
'200':
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeAssociationPaging'
|
||||
$ref: '#/definitions/FilePlanComponentAssociationPaging'
|
||||
'401':
|
||||
description: If authentication fails
|
||||
'403':
|
||||
@@ -375,7 +375,7 @@ paths:
|
||||
description: If true, then a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.
|
||||
required: false
|
||||
type: boolean
|
||||
- $ref: '#/parameters/IGNodeEntryIncludeParam'
|
||||
- $ref: '#/parameters/FilePlanComponentEntryIncludeParam'
|
||||
- $ref: '#/parameters/fieldsParam'
|
||||
- in: body
|
||||
name: nodeBodyCreate
|
||||
@@ -395,7 +395,7 @@ paths:
|
||||
'201':
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeEntry'
|
||||
$ref: '#/definitions/FilePlanComponentEntry'
|
||||
'400':
|
||||
description: |
|
||||
Invalid parameter: **fileplanComponentId** is not a valid format or **nodeBodyCreate** is invalid
|
||||
@@ -617,7 +617,7 @@ paths:
|
||||
operationId: fileRecord
|
||||
parameters:
|
||||
- $ref: '#/parameters/recordIdParam'
|
||||
- $ref: '#/parameters/IGNodeEntryIncludeParam'
|
||||
- $ref: '#/parameters/FilePlanComponentEntryIncludeParam'
|
||||
- $ref: '#/parameters/fieldsParam'
|
||||
- in: body
|
||||
name: nodeBodyFile
|
||||
@@ -633,7 +633,7 @@ paths:
|
||||
'200':
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeEntry'
|
||||
$ref: '#/definitions/FilePlanComponentEntry'
|
||||
'400':
|
||||
description: |
|
||||
Invalid parameter: **recordIdParam** or **targetParentId** is not a valid format,
|
||||
@@ -670,7 +670,7 @@ paths:
|
||||
description: Flag to indicate whether the record should be hidden from the current parent folder.
|
||||
type: boolean
|
||||
default: false
|
||||
- $ref: '#/parameters/IGNodeEntryIncludeParam'
|
||||
- $ref: '#/parameters/FilePlanComponentEntryIncludeParam'
|
||||
- $ref: '#/parameters/fieldsParam'
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -680,7 +680,7 @@ paths:
|
||||
'200':
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/IGNodeEntry'
|
||||
$ref: '#/definitions/FilePlanComponentEntry'
|
||||
'400':
|
||||
description: |
|
||||
Invalid parameter: **fileId** is not a valid format
|
||||
@@ -742,7 +742,7 @@ parameters:
|
||||
information is returned on the node resolved by this path.
|
||||
required: false
|
||||
type: string
|
||||
IGNodeEntryIncludeParam:
|
||||
FilePlanComponentEntryIncludeParam:
|
||||
name: include
|
||||
in: query
|
||||
description: |
|
||||
@@ -854,14 +854,14 @@ parameters:
|
||||
type: string
|
||||
format: date-time
|
||||
definitions:
|
||||
IGNodeEntry:
|
||||
FilePlanComponentEntry:
|
||||
type: object
|
||||
required:
|
||||
- entry
|
||||
properties:
|
||||
entry:
|
||||
$ref: '#/definitions/IGNode'
|
||||
IGNode:
|
||||
$ref: '#/definitions/FilePlanComponent'
|
||||
FilePlanComponent:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
@@ -932,7 +932,7 @@ definitions:
|
||||
type: string
|
||||
path:
|
||||
$ref: '#/definitions/PathInfo'
|
||||
IGNodeAssociationPaging:
|
||||
FilePlanComponentAssociationPaging:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
@@ -943,24 +943,24 @@ definitions:
|
||||
entries:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/IGNodeChildAssociationEntry'
|
||||
$ref: '#/definitions/FilePlanComponentChildAssociationEntry'
|
||||
source:
|
||||
$ref: '#/definitions/IGNode'
|
||||
IGNodeChildAssociationEntry:
|
||||
$ref: '#/definitions/FilePlanComponent'
|
||||
FilePlanComponentChildAssociationEntry:
|
||||
type: object
|
||||
required:
|
||||
- entry
|
||||
properties:
|
||||
entry:
|
||||
$ref: '#/definitions/IGNodeChildAssociation'
|
||||
IGNodeChildAssociation:
|
||||
$ref: '#/definitions/FilePlanComponentChildAssociation'
|
||||
FilePlanComponentChildAssociation:
|
||||
allOf:
|
||||
- $ref: '#/definitions/IGNode'
|
||||
- $ref: '#/definitions/FilePlanComponent'
|
||||
- type: object
|
||||
properties:
|
||||
association:
|
||||
$ref: '#/definitions/ChildAssociationInfo'
|
||||
IGNodeBodyUpdate:
|
||||
FilePlanComponentBodyUpdate:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
|
Reference in New Issue
Block a user