mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'master' of git.alfresco.com:records-management/records-management into feature/RM-4921_TestUpdates
This commit is contained in:
@@ -39,22 +39,23 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.alfresco.query.PagingResults;
|
import org.alfresco.query.PagingResults;
|
||||||
import org.alfresco.repo.activities.ActivityType;
|
|
||||||
import org.alfresco.repo.node.getchildren.FilterProp;
|
import org.alfresco.repo.node.getchildren.FilterProp;
|
||||||
|
import org.alfresco.repo.node.integrity.IntegrityException;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
import org.alfresco.rest.api.impl.Util;
|
import org.alfresco.rest.api.impl.Util;
|
||||||
import org.alfresco.rest.api.model.UserInfo;
|
import org.alfresco.rest.api.model.UserInfo;
|
||||||
import org.alfresco.rest.framework.WebApiDescription;
|
import org.alfresco.rest.framework.WebApiDescription;
|
||||||
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
|
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
|
||||||
import org.alfresco.rest.framework.resource.RelationshipResource;
|
import org.alfresco.rest.framework.resource.RelationshipResource;
|
||||||
|
import org.alfresco.rest.framework.resource.actions.interfaces.MultiPartRelationshipResourceAction;
|
||||||
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
|
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
|
||||||
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||||
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
|
import org.alfresco.rest.framework.webscripts.WithResponse;
|
||||||
import org.alfresco.rm.rest.api.impl.ApiNodesModelFactory;
|
import org.alfresco.rm.rest.api.impl.ApiNodesModelFactory;
|
||||||
import org.alfresco.rm.rest.api.impl.FilePlanComponentsApiUtils;
|
import org.alfresco.rm.rest.api.impl.FilePlanComponentsApiUtils;
|
||||||
import org.alfresco.rm.rest.api.impl.SearchTypesFactory;
|
import org.alfresco.rm.rest.api.impl.SearchTypesFactory;
|
||||||
import org.alfresco.rm.rest.api.model.FilePlan;
|
import org.alfresco.rm.rest.api.model.FilePlan;
|
||||||
import org.alfresco.rm.rest.api.model.Record;
|
|
||||||
import org.alfresco.rm.rest.api.model.RecordCategory;
|
import org.alfresco.rm.rest.api.model.RecordCategory;
|
||||||
import org.alfresco.service.cmr.model.FileFolderService;
|
import org.alfresco.service.cmr.model.FileFolderService;
|
||||||
import org.alfresco.service.cmr.model.FileInfo;
|
import org.alfresco.service.cmr.model.FileInfo;
|
||||||
@@ -63,6 +64,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ParameterCheck;
|
import org.alfresco.util.ParameterCheck;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
import org.springframework.extensions.webscripts.servlet.FormData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File plan children relation
|
* File plan children relation
|
||||||
@@ -72,7 +74,9 @@ import org.springframework.beans.factory.InitializingBean;
|
|||||||
*/
|
*/
|
||||||
@RelationshipResource(name="categories", entityResource = FilePlanEntityResource.class, title = "Category children of file plan")
|
@RelationshipResource(name="categories", entityResource = FilePlanEntityResource.class, title = "Category children of file plan")
|
||||||
public class FilePlanChildrenRelation implements RelationshipResourceAction.Read<RecordCategory>,
|
public class FilePlanChildrenRelation implements RelationshipResourceAction.Read<RecordCategory>,
|
||||||
RelationshipResourceAction.Create<RecordCategory>, InitializingBean
|
RelationshipResourceAction.Create<RecordCategory>,
|
||||||
|
MultiPartRelationshipResourceAction.Create<RecordCategory>,
|
||||||
|
InitializingBean
|
||||||
{
|
{
|
||||||
/** Record category type */
|
/** Record category type */
|
||||||
public static final String RECORD_CATEGORY_TYPE = "rma:recordCategory";
|
public static final String RECORD_CATEGORY_TYPE = "rma:recordCategory";
|
||||||
@@ -218,4 +222,13 @@ public class FilePlanChildrenRelation implements RelationshipResourceAction.Read
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.rest.framework.resource.actions.interfaces.MultiPartRelationshipResourceAction.Create#create(java.lang.String, org.springframework.extensions.webscripts.servlet.FormData, org.alfresco.rest.framework.resource.parameters.Parameters, org.alfresco.rest.framework.webscripts.WithResponse)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RecordCategory create(String entityResourceId, FormData formData, Parameters parameters, WithResponse withResponse)
|
||||||
|
{
|
||||||
|
throw new IntegrityException("Uploading records into file plan root is not allowed.", null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,16 +30,13 @@ package org.alfresco.rm.rest.api.fileplans;
|
|||||||
import static org.alfresco.module.org_alfresco_module_rm.util.RMParameterCheck.checkNotBlank;
|
import static org.alfresco.module.org_alfresco_module_rm.util.RMParameterCheck.checkNotBlank;
|
||||||
import static org.alfresco.util.ParameterCheck.mandatory;
|
import static org.alfresco.util.ParameterCheck.mandatory;
|
||||||
|
|
||||||
import org.alfresco.repo.node.integrity.IntegrityException;
|
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
import org.alfresco.rest.framework.WebApiDescription;
|
import org.alfresco.rest.framework.WebApiDescription;
|
||||||
import org.alfresco.rest.framework.WebApiParam;
|
import org.alfresco.rest.framework.WebApiParam;
|
||||||
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
|
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
|
||||||
import org.alfresco.rest.framework.resource.EntityResource;
|
import org.alfresco.rest.framework.resource.EntityResource;
|
||||||
import org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction;
|
import org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction;
|
||||||
import org.alfresco.rest.framework.resource.actions.interfaces.MultiPartRelationshipResourceAction;
|
|
||||||
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
import org.alfresco.rest.framework.webscripts.WithResponse;
|
|
||||||
import org.alfresco.rm.rest.api.impl.ApiNodesModelFactory;
|
import org.alfresco.rm.rest.api.impl.ApiNodesModelFactory;
|
||||||
import org.alfresco.rm.rest.api.impl.FilePlanComponentsApiUtils;
|
import org.alfresco.rm.rest.api.impl.FilePlanComponentsApiUtils;
|
||||||
import org.alfresco.rm.rest.api.model.FilePlan;
|
import org.alfresco.rm.rest.api.model.FilePlan;
|
||||||
@@ -50,7 +47,6 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ParameterCheck;
|
import org.alfresco.util.ParameterCheck;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.extensions.webscripts.servlet.FormData;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File plan entity resource
|
* File plan entity resource
|
||||||
@@ -61,7 +57,6 @@ import org.springframework.extensions.webscripts.servlet.FormData;
|
|||||||
@EntityResource(name = "file-plans", title = "File plans")
|
@EntityResource(name = "file-plans", title = "File plans")
|
||||||
public class FilePlanEntityResource implements EntityResourceAction.ReadById<FilePlan>,
|
public class FilePlanEntityResource implements EntityResourceAction.ReadById<FilePlan>,
|
||||||
EntityResourceAction.Update<FilePlan>,
|
EntityResourceAction.Update<FilePlan>,
|
||||||
MultiPartRelationshipResourceAction.Create<FilePlan>,
|
|
||||||
InitializingBean
|
InitializingBean
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -153,10 +148,4 @@ public class FilePlanEntityResource implements EntityResourceAction.ReadById<Fil
|
|||||||
|
|
||||||
return nodesModelFactory.createFilePlan(info, parameters, null, false);
|
return nodesModelFactory.createFilePlan(info, parameters, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public FilePlan create(String entityResourceId, FormData formData, Parameters parameters, WithResponse withResponse)
|
|
||||||
{
|
|
||||||
throw new IntegrityException("Uploading records into file plan root is not allowed.", null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -215,8 +215,7 @@ public class RecordCategoryChildrenRelation implements RelationshipResourceActio
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RecordCategoryChild create(String entityResourceId, FormData formData, Parameters parameters,
|
public RecordCategoryChild create(String entityResourceId, FormData formData, Parameters parameters, WithResponse withResponse)
|
||||||
WithResponse withResponse)
|
|
||||||
{
|
{
|
||||||
throw new IntegrityException("Uploading records into record categories is not allowed.", null);
|
throw new IntegrityException("Uploading records into record categories is not allowed.", null);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user