From 3a7bda1aed87a54a14b6e99d23be1e13929fbe6b Mon Sep 17 00:00:00 2001 From: Silviu Dinuta Date: Wed, 19 Oct 2016 17:08:03 +0300 Subject: [PATCH] RM-4199: changed package structure, removed content2.bin since we don't use welcome component for rm site, also added some comments and simplified the validation of the site since we don't need to ad site id and site visibility for rm site, given that site id is always rm and site visibility always PUBLIC --- .../bootstrap/site/surf-config.xml | 16 ----- .../bootstrap/site/surf-config/content2.bin | 12 ---- .../rm-public-rest-context.xml | 25 ++----- .../org/alfresco/rest/api/impl/RMSites.java | 35 ---------- .../{ => rm}/rest/api/impl/RMNodes.java | 2 +- .../{ => rm}/rest/api/impl/RMNodesImpl.java | 11 ++-- .../{ => rm}/rest/api/impl/RMSitesImpl.java | 65 ++++++++----------- .../{ => rm}/rest/api/model/CategoryNode.java | 4 +- .../rest/api/model/FileplanComponentNode.java | 8 ++- .../rest/api/model/RecordFolderNode.java | 4 +- .../{ => rm}/rest/api/model/RecordNode.java | 4 +- .../FileplanComponentChildrenRelation.java | 3 +- .../FileplanComponentsEntityResource.java | 2 +- .../rest/api/nodes}/package-info.java | 2 +- .../rest/api/sites/RMSiteEntityResource.java | 23 ++----- .../{ => rm}/rest/api/sites/package-info.java | 2 +- 16 files changed, 63 insertions(+), 155 deletions(-) delete mode 100644 rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config/content2.bin delete mode 100644 rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSites.java rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/impl/RMNodes.java (97%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/impl/RMNodesImpl.java (97%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/impl/RMSitesImpl.java (76%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/model/CategoryNode.java (94%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/model/FileplanComponentNode.java (94%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/model/RecordFolderNode.java (94%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/model/RecordNode.java (94%) rename rm-community/rm-community-repo/source/java/org/alfresco/{rest/api => rm/rest/api/nodes}/FileplanComponentChildrenRelation.java (97%) rename rm-community/rm-community-repo/source/java/org/alfresco/{rest/api => rm/rest/api/nodes}/FileplanComponentsEntityResource.java (98%) rename rm-community/rm-community-repo/source/java/org/alfresco/{rest/api => rm/rest/api/nodes}/package-info.java (97%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/sites/RMSiteEntityResource.java (72%) rename rm-community/rm-community-repo/source/java/org/alfresco/{ => rm}/rest/api/sites/package-info.java (97%) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config.xml index 85e3048e1a..2f5124eefe 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config.xml @@ -64,22 +64,6 @@ false - - - - - - - - - page.full-width-dashlet.site~${siteId}~dashboard.xml - SpacesStore - en_US_ - contentUrl=surf-config/content2.bin|mimetype=application/octet-stream|size=356|encoding=UTF-8|locale=en_US_ - workspace - false - - diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config/content2.bin b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config/content2.bin deleted file mode 100644 index a2df728c60..0000000000 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/site/surf-config/content2.bin +++ /dev/null @@ -1,12 +0,0 @@ - - - - page.full-width-dashlet.site~${siteId}~dashboard - page - full-width-dashlet - site/${siteId}/dashboard - /components/dashlets/dynamic-welcome - - site - - diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml index d9a9d95e60..34b6642daa 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml @@ -23,7 +23,7 @@ - + @@ -43,34 +43,19 @@ - + - + - - - - - - - - - + - - - - @@ -89,7 +74,7 @@ - + \ No newline at end of file diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSites.java b/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSites.java deleted file mode 100644 index cc334dfaa4..0000000000 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSites.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * #%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 . - * #L% - */ - -package org.alfresco.rest.api.impl; - -import org.alfresco.rest.api.Sites; - -public interface RMSites extends Sites -{ - -} diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMNodes.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodes.java similarity index 97% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMNodes.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodes.java index fbb9794a01..78f85a080d 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMNodes.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodes.java @@ -24,7 +24,7 @@ * along with Alfresco. If not, see . * #L% */ -package org.alfresco.rest.api.impl; +package org.alfresco.rm.rest.api.impl; import org.alfresco.rest.api.Nodes; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMNodesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java similarity index 97% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMNodesImpl.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java index 46ce07ed32..d867c9ede5 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMNodesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java @@ -25,7 +25,7 @@ * #L% */ -package org.alfresco.rest.api.impl; +package org.alfresco.rm.rest.api.impl; import java.security.InvalidParameterException; import java.util.HashMap; @@ -40,15 +40,16 @@ import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; import org.alfresco.repo.model.Repository; -import org.alfresco.rest.api.model.CategoryNode; -import org.alfresco.rest.api.model.FileplanComponentNode; +import org.alfresco.rest.api.impl.NodesImpl; import org.alfresco.rest.api.model.Node; -import org.alfresco.rest.api.model.RecordFolderNode; -import org.alfresco.rest.api.model.RecordNode; import org.alfresco.rest.api.model.UserInfo; import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException; import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException; import org.alfresco.rest.framework.resource.parameters.Parameters; +import org.alfresco.rm.rest.api.model.CategoryNode; +import org.alfresco.rm.rest.api.model.FileplanComponentNode; +import org.alfresco.rm.rest.api.model.RecordFolderNode; +import org.alfresco.rm.rest.api.model.RecordNode; import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSitesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMSitesImpl.java similarity index 76% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSitesImpl.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMSitesImpl.java index 8e019a49ee..338d20d161 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/impl/RMSitesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMSitesImpl.java @@ -25,12 +25,14 @@ * #L% */ -package org.alfresco.rest.api.impl; +package org.alfresco.rm.rest.api.impl; import org.alfresco.model.ContentModel; import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.site.SiteServiceException; +import org.alfresco.rest.api.impl.SiteImportPackageHandler; +import org.alfresco.rest.api.impl.SitesImpl; import org.alfresco.rest.api.model.Site; import org.alfresco.rest.framework.core.exceptions.ConstraintViolatedException; import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException; @@ -47,17 +49,17 @@ import org.alfresco.service.cmr.view.Location; import org.alfresco.service.namespace.QName; /** + * Centralizes access to site services. * * @author Silviu Dinuta * @since 2.6 * */ -public class RMSitesImpl extends SitesImpl implements RMSites +public class RMSitesImpl extends SitesImpl { - private static final int SITE_MAXLEN_ID = 72; + private static final String RM_SITE_ID = "rm"; private static final int SITE_MAXLEN_TITLE = 256; private static final int SITE_MAXLEN_DESCRIPTION = 512; - private static final String SITE_ID_VALID_CHARS_PARTIAL_REGEX = "A-Za-z0-9\\-"; @Override public Site createSite(Site site, Parameters parameters) { @@ -67,7 +69,7 @@ public class RMSitesImpl extends SitesImpl implements RMSites SiteInfo siteInfo = null; try { - siteInfo = siteService.createSite("rm-site-dashboard", site.getId(), site.getTitle(), site.getDescription(), site.getVisibility(), RecordsManagementModel.TYPE_RM_SITE); + siteInfo = siteService.createSite("rm-site-dashboard", RM_SITE_ID, site.getTitle(), site.getDescription(), SiteVisibility.PUBLIC, RecordsManagementModel.TYPE_RM_SITE); } catch (SiteServiceException sse) { @@ -96,6 +98,13 @@ public class RMSitesImpl extends SitesImpl implements RMSites return getSite(siteInfo, true); } + /** + * Copied from SitesImpl since we didn't had access to it. + * + * @param siteInfo + * @param includeRole + * @return + */ private Site getSite(SiteInfo siteInfo, boolean includeRole) { // set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url) @@ -108,6 +117,12 @@ public class RMSitesImpl extends SitesImpl implements RMSites return new Site(siteInfo, role); } + /** + * Copied from SitesImpl since we didn't had access to it + * + * @param siteId + * @param siteNodeRef + */ private void importSite(final String siteId, final NodeRef siteNodeRef) { ImportPackageHandler acpHandler = new SiteImportPackageHandler(siteSurfConfig, siteId); @@ -151,6 +166,14 @@ public class RMSitesImpl extends SitesImpl implements RMSites importerService.importView(acpHandler, location, binding, (ImporterProgress)null); } + /** + * This method is copied from SitesImpl since we could not access it since it is private. + * + * Even if the method it will be protected in core, we still need to override since we don't need to check if the visibility is set since for RM site it is always PUBLIC. + * We also don't need to generate the id from title, or to check the id, since the id is always rm. + * @param site + * @return + */ private Site validateSite(Site site) { // site title - mandatory @@ -164,38 +187,6 @@ public class RMSitesImpl extends SitesImpl implements RMSites throw new InvalidArgumentException("Site title exceeds max length of "+SITE_MAXLEN_TITLE+" characters"); } - SiteVisibility siteVisibility = site.getVisibility(); - if (siteVisibility == null) - { - throw new InvalidArgumentException("Site visibility is expected: "+siteTitle+" (eg. PUBLIC, PRIVATE, MODERATED)"); - } - - String siteId = site.getId(); - if (siteId == null) - { - // generate a site id from title (similar to Share create site dialog) - siteId = siteTitle. - trim(). // trim leading & trailing whitespace - replaceAll("[^"+SITE_ID_VALID_CHARS_PARTIAL_REGEX+" ]",""). // remove special characters (except spaces) - replaceAll(" +", " "). // collapse multiple spaces to single space - replace(" ","-"). // replaces spaces with dashs - toLowerCase(); // lowercase :-) - } - else - { - if (! siteId.matches("^["+SITE_ID_VALID_CHARS_PARTIAL_REGEX+"]+")) - { - throw new InvalidArgumentException("Invalid site id - should consist of alphanumeric/dash characters"); - } - } - - if (siteId.length() > SITE_MAXLEN_ID) - { - throw new InvalidArgumentException("Site id exceeds max length of "+SITE_MAXLEN_ID+ "characters"); - } - - site.setId(siteId); - String siteDescription = site.getDescription(); if (siteDescription == null) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/CategoryNode.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/CategoryNode.java similarity index 94% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/CategoryNode.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/CategoryNode.java index 60a6d5830c..a211722bb0 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/CategoryNode.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/CategoryNode.java @@ -24,11 +24,13 @@ * along with Alfresco. If not, see . * #L% */ -package org.alfresco.rest.api.model; +package org.alfresco.rm.rest.api.model; import java.io.Serializable; import java.util.Map; +import org.alfresco.rest.api.model.Node; +import org.alfresco.rest.api.model.UserInfo; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/FileplanComponentNode.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/FileplanComponentNode.java similarity index 94% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/FileplanComponentNode.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/FileplanComponentNode.java index 6531ff19f2..2e1cfbbe37 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/FileplanComponentNode.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/FileplanComponentNode.java @@ -25,18 +25,20 @@ * #L% */ -package org.alfresco.rest.api.model; +package org.alfresco.rm.rest.api.model; import java.io.Serializable; import java.util.Map; +import org.alfresco.rest.api.model.Node; +import org.alfresco.rest.api.model.UserInfo; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; /** * Concrete class carrying general information for a fileplan component node - * + * * @author Ana Bozianu * @since 2.6 */ @@ -71,7 +73,7 @@ public class FileplanComponentNode extends Node this.properties =node.getProperties(); this.allowableOperations = node.getAllowableOperations(); this.contentInfo = node.getContent(); - this.description = node.description; + this.description = node.getDescription(); defineType(); } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/RecordFolderNode.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RecordFolderNode.java similarity index 94% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/RecordFolderNode.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RecordFolderNode.java index 9aeaca65ed..31eacf6bed 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/RecordFolderNode.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RecordFolderNode.java @@ -24,11 +24,13 @@ * along with Alfresco. If not, see . * #L% */ -package org.alfresco.rest.api.model; +package org.alfresco.rm.rest.api.model; import java.io.Serializable; import java.util.Map; +import org.alfresco.rest.api.model.Node; +import org.alfresco.rest.api.model.UserInfo; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/RecordNode.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RecordNode.java similarity index 94% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/RecordNode.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RecordNode.java index b5c85c8128..4343fc6a36 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/model/RecordNode.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RecordNode.java @@ -24,11 +24,13 @@ * along with Alfresco. If not, see . * #L% */ -package org.alfresco.rest.api.model; +package org.alfresco.rm.rest.api.model; import java.io.Serializable; import java.util.Map; +import org.alfresco.rest.api.model.Node; +import org.alfresco.rest.api.model.UserInfo; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/FileplanComponentChildrenRelation.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/FileplanComponentChildrenRelation.java similarity index 97% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/FileplanComponentChildrenRelation.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/FileplanComponentChildrenRelation.java index 254432f891..3fc5400faf 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/FileplanComponentChildrenRelation.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/FileplanComponentChildrenRelation.java @@ -24,11 +24,12 @@ * along with Alfresco. If not, see . * #L% */ -package org.alfresco.rest.api; +package org.alfresco.rm.rest.api.nodes; import java.util.ArrayList; import java.util.List; +import org.alfresco.rest.api.Nodes; import org.alfresco.rest.api.model.Node; import org.alfresco.rest.framework.resource.RelationshipResource; import org.alfresco.rest.framework.resource.actions.interfaces.MultiPartRelationshipResourceAction; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/FileplanComponentsEntityResource.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/FileplanComponentsEntityResource.java similarity index 98% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/FileplanComponentsEntityResource.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/FileplanComponentsEntityResource.java index d020a569aa..1b9fb62578 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/FileplanComponentsEntityResource.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/FileplanComponentsEntityResource.java @@ -25,7 +25,7 @@ * #L% */ -package org.alfresco.rest.api; +package org.alfresco.rm.rest.api.nodes; import org.alfresco.rest.api.Nodes; import org.alfresco.rest.api.model.Node; diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/package-info.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/package-info.java similarity index 97% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/package-info.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/package-info.java index ff4c94f65d..3c21339b64 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/package-info.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/nodes/package-info.java @@ -32,6 +32,6 @@ * @since 2.6 */ @WebApi(name="ig", scope=Api.SCOPE.PUBLIC, version=1) -package org.alfresco.rest.api; +package org.alfresco.rm.rest.api.nodes; import org.alfresco.rest.framework.Api; import org.alfresco.rest.framework.WebApi; \ No newline at end of file diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/sites/RMSiteEntityResource.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/sites/RMSiteEntityResource.java similarity index 72% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/sites/RMSiteEntityResource.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/sites/RMSiteEntityResource.java index f202f55e78..7539044e91 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/sites/RMSiteEntityResource.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/sites/RMSiteEntityResource.java @@ -25,17 +25,15 @@ * #L% */ -package org.alfresco.rest.api.sites; +package org.alfresco.rm.rest.api.sites; import java.util.ArrayList; import java.util.List; import org.alfresco.rest.api.Sites; import org.alfresco.rest.api.model.Site; -import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException; import org.alfresco.rest.framework.resource.EntityResource; import org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction; -import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo; import org.alfresco.rest.framework.resource.parameters.Parameters; /** @@ -44,10 +42,9 @@ import org.alfresco.rest.framework.resource.parameters.Parameters; * @since 2.6 * */ -@EntityResource(name = "ig-sites", title = "IG Sites") -public class RMSiteEntityResource implements EntityResourceAction.Read, EntityResourceAction.ReadById, - EntityResourceAction.Delete, EntityResourceAction.Create { - +@EntityResource(name = "sites", title = "IG Sites") +public class RMSiteEntityResource implements EntityResourceAction.Delete, EntityResourceAction.Create +{ private Sites sites; public void setSites(Sites sites) { @@ -64,17 +61,5 @@ public class RMSiteEntityResource implements EntityResourceAction.Read, En @Override public void delete(String id, Parameters parameters) { sites.deleteSite(id, parameters); - } - - @Override - public Site readById(String id, Parameters parameters) throws EntityNotFoundException { - return sites.getSite(id); - } - - @Override - public CollectionWithPagingInfo readAll(Parameters params) { - return sites.getSites(params); - } - } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/sites/package-info.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/sites/package-info.java similarity index 97% rename from rm-community/rm-community-repo/source/java/org/alfresco/rest/api/sites/package-info.java rename to rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/sites/package-info.java index 5a0ec7cb83..3a8c97131a 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rest/api/sites/package-info.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/sites/package-info.java @@ -32,6 +32,6 @@ * @since 2.6 */ @WebApi(name="ig", scope=Api.SCOPE.PUBLIC, version=1) -package org.alfresco.rest.api.sites; +package org.alfresco.rm.rest.api.sites; import org.alfresco.rest.framework.Api; import org.alfresco.rest.framework.WebApi; \ No newline at end of file