mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	[APPS-2836] POST Endpoint for creating Retention Schedule
This commit is contained in:
		@@ -139,7 +139,7 @@
 | 
			
		||||
       <property name="transactionService" ref="transactionService" />
 | 
			
		||||
    </bean>
 | 
			
		||||
 | 
			
		||||
    <bean class="org.alfresco.rm.rest.api.recordcategories.RetentionScheduleRelation">
 | 
			
		||||
    <bean class="org.alfresco.rm.rest.api.rententionschedule.RetentionScheduleRelation">
 | 
			
		||||
        <property name="apiUtils" ref="apiUtils" />
 | 
			
		||||
        <property name="nodesModelFactory" ref="nodesModelFactory" />
 | 
			
		||||
        <property name="dispositionService" ref="DispositionService"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -939,11 +939,11 @@ public class ApiNodesModelFactory
 | 
			
		||||
        retentionScheduleActionDefinition.setDescription(dispositionActionDefinition.getDescription());
 | 
			
		||||
        String period = dispositionActionDefinition.getPeriod().toString();
 | 
			
		||||
        String[] periodArray = period.split("\\|");
 | 
			
		||||
        if(periodArray[0] != null && !periodArray[0].isEmpty())
 | 
			
		||||
        if(periodArray.length == 1)
 | 
			
		||||
        {
 | 
			
		||||
            retentionScheduleActionDefinition.setPeriod(periodArray[0]);
 | 
			
		||||
        }
 | 
			
		||||
        if(periodArray[0] != null && !periodArray[1].isEmpty())
 | 
			
		||||
        if(periodArray.length == 2)
 | 
			
		||||
        {
 | 
			
		||||
            retentionScheduleActionDefinition.setPeriodAmount(Integer.parseInt(periodArray[1]));
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
 * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * #L%
 | 
			
		||||
 */
 | 
			
		||||
package org.alfresco.rm.rest.api.recordcategories;
 | 
			
		||||
package org.alfresco.rm.rest.api.rententionschedule;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
 | 
			
		||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
 | 
			
		||||
@@ -36,6 +36,7 @@ import org.alfresco.rest.framework.resource.parameters.Parameters;
 | 
			
		||||
import org.alfresco.rm.rest.api.impl.ApiNodesModelFactory;
 | 
			
		||||
import org.alfresco.rm.rest.api.impl.FilePlanComponentsApiUtils;
 | 
			
		||||
import org.alfresco.rm.rest.api.model.RetentionSchedule;
 | 
			
		||||
import org.alfresco.rm.rest.api.recordcategories.RecordCategoriesEntityResource;
 | 
			
		||||
import org.alfresco.service.cmr.repository.NodeRef;
 | 
			
		||||
import org.alfresco.service.cmr.repository.NodeService;
 | 
			
		||||
import org.alfresco.service.cmr.repository.StoreRef;
 | 
			
		||||
@@ -0,0 +1,37 @@
 | 
			
		||||
/*
 | 
			
		||||
 * #%L
 | 
			
		||||
 * Alfresco Records Management Module
 | 
			
		||||
 * %%
 | 
			
		||||
 * Copyright (C) 2005 - 2016 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 info that defines the Information Governance Record Categories REST API
 | 
			
		||||
 *
 | 
			
		||||
 * @author Ana Bozianu
 | 
			
		||||
 * @since 2.6
 | 
			
		||||
 */
 | 
			
		||||
@WebApi(name="gs", scope=Api.SCOPE.PUBLIC, version=1)
 | 
			
		||||
package org.alfresco.rm.rest.api.rententionschedule;
 | 
			
		||||
import org.alfresco.rest.framework.Api;
 | 
			
		||||
import org.alfresco.rest.framework.WebApi;
 | 
			
		||||
		Reference in New Issue
	
	Block a user