mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
REPO-1058 / REPO-1244: REST API - list Sites - orderBy
- tweak the default (as agreed with GC) - update automated unit test (and also refactor to make it re-runnable and to consistently use create site api) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130854 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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:
|
||||
*
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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%
|
||||
@@ -101,6 +101,15 @@ public class SiteImpl implements Serializable, Site, Comparable<SiteImpl>, Expec
|
||||
this.guid = siteInfo.getNodeRef().getId();
|
||||
}
|
||||
|
||||
public SiteImpl(String siteId, String title, String description, String visibility)
|
||||
{
|
||||
super();
|
||||
this.siteId = siteId;
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
public SiteImpl(String networkId, String siteId, String guid, String title, String description,
|
||||
String visibility, String type, SiteRole siteRole)
|
||||
{
|
||||
@@ -218,11 +227,11 @@ public class SiteImpl implements Serializable, Site, Comparable<SiteImpl>, Expec
|
||||
|
||||
public static Site parseSite(JSONObject jsonObject)
|
||||
{
|
||||
if (jsonObject == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (jsonObject == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String id = (String)jsonObject.get("id");
|
||||
String guid = (String)jsonObject.get("guid");
|
||||
String title = (String)jsonObject.get("title");
|
||||
@@ -292,10 +301,10 @@ public class SiteImpl implements Serializable, Site, Comparable<SiteImpl>, Expec
|
||||
{
|
||||
siteJson.put("title", getTitle());
|
||||
}
|
||||
if (getDescription() != null)
|
||||
{
|
||||
siteJson.put("description", getDescription());
|
||||
}
|
||||
if (getDescription() != null)
|
||||
{
|
||||
siteJson.put("description", getDescription());
|
||||
}
|
||||
if (getVisibility() != null)
|
||||
{
|
||||
siteJson.put("visibility", getVisibility());
|
||||
|
Reference in New Issue
Block a user