mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Minor - re-formatting only (fix tabs to spaces)
- noted via REPO-1390 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@131866 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -42,7 +42,7 @@ public interface Sites
|
||||
void deleteSite(String siteId, Parameters parameters);
|
||||
Site createSite(Site site, Parameters parameters);
|
||||
Site updateSite(String siteId, SiteUpdate site, Parameters parameters);
|
||||
|
||||
|
||||
/**
|
||||
* people/<personId>/sites/<siteId>
|
||||
*
|
||||
@@ -63,19 +63,19 @@ public interface Sites
|
||||
void addFavouriteSite(String personId, FavouriteSite favouriteSite);
|
||||
void removeFavouriteSite(String personId, String siteId);
|
||||
CollectionWithPagingInfo<FavouriteSite> getFavouriteSites(String personId, Parameters parameters);
|
||||
|
||||
|
||||
String getSiteRole(String siteId);
|
||||
String getSiteRole(String siteId, String personId);
|
||||
|
||||
String PARAM_PERMANENT = "permanent";
|
||||
String PARAM_SKIP_ADDTOFAVORITES = "skipAddToFavorites";
|
||||
String PARAM_SKIP_SURF_CONFIGURATION = "skipConfiguration";
|
||||
|
||||
String PARAM_SITE_ID = "id";
|
||||
String PARAM_SITE_TITLE = "title";
|
||||
String PARAM_SITE_DESCRIPTION = "description";
|
||||
String PARAM_SKIP_ADDTOFAVORITES = "skipAddToFavorites";
|
||||
String PARAM_SKIP_SURF_CONFIGURATION = "skipConfiguration";
|
||||
|
||||
String PARAM_SITE_ROLE = "role";
|
||||
String PARAM_SITE_ID = "id";
|
||||
String PARAM_SITE_TITLE = "title";
|
||||
String PARAM_SITE_DESCRIPTION = "description";
|
||||
|
||||
String PARAM_SITE_ROLE = "role";
|
||||
String PARAM_VISIBILITY = "visibility";
|
||||
String PARAM_PRESET = "preset";
|
||||
}
|
||||
|
@@ -26,7 +26,6 @@
|
||||
package org.alfresco.rest.api.model;
|
||||
|
||||
import org.alfresco.rest.framework.resource.UniqueId;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.site.SiteInfo;
|
||||
import org.alfresco.service.cmr.site.SiteVisibility;
|
||||
|
||||
@@ -38,80 +37,80 @@ import org.alfresco.service.cmr.site.SiteVisibility;
|
||||
*/
|
||||
public class Site implements Comparable<Site>
|
||||
{
|
||||
public static final String ROLE = "role";
|
||||
public static final String ROLE = "role";
|
||||
|
||||
protected String id; // site id (aka short name)
|
||||
protected String guid; // site nodeId
|
||||
protected String title;
|
||||
protected String description;
|
||||
protected SiteVisibility visibility;
|
||||
protected String id; // site id (aka short name)
|
||||
protected String guid; // site nodeId
|
||||
protected String title;
|
||||
protected String description;
|
||||
protected SiteVisibility visibility;
|
||||
protected String preset;
|
||||
protected String role;
|
||||
protected String role;
|
||||
|
||||
public Site()
|
||||
{
|
||||
}
|
||||
|
||||
public Site(SiteInfo siteInfo, String role)
|
||||
{
|
||||
if(siteInfo == null)
|
||||
{
|
||||
throw new IllegalArgumentException("Must provide siteInfo");
|
||||
}
|
||||
this.id = siteInfo.getShortName();
|
||||
this.guid = siteInfo.getNodeRef().getId();
|
||||
this.title = siteInfo.getTitle();
|
||||
this.description = siteInfo.getDescription();
|
||||
this.visibility = siteInfo.getVisibility();
|
||||
public Site()
|
||||
{
|
||||
}
|
||||
|
||||
public Site(SiteInfo siteInfo, String role)
|
||||
{
|
||||
if (siteInfo == null)
|
||||
{
|
||||
throw new IllegalArgumentException("Must provide siteInfo");
|
||||
}
|
||||
this.id = siteInfo.getShortName();
|
||||
this.guid = siteInfo.getNodeRef().getId();
|
||||
this.title = siteInfo.getTitle();
|
||||
this.description = siteInfo.getDescription();
|
||||
this.visibility = siteInfo.getVisibility();
|
||||
this.preset = siteInfo.getSitePreset();
|
||||
this.role = role;
|
||||
}
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
@UniqueId
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
@UniqueId
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public SiteVisibility getVisibility()
|
||||
{
|
||||
return visibility;
|
||||
}
|
||||
public SiteVisibility getVisibility()
|
||||
{
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(SiteVisibility visibility)
|
||||
{
|
||||
@@ -122,7 +121,7 @@ public class Site implements Comparable<Site>
|
||||
{
|
||||
return preset;
|
||||
}
|
||||
|
||||
|
||||
public void setPreset(String preset)
|
||||
{
|
||||
this.preset = preset;
|
||||
@@ -138,50 +137,49 @@ public class Site implements Comparable<Site>
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (this == obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (obj == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getClass() != obj.getClass())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Site other = (Site) obj;
|
||||
return id.equals(other.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Site site)
|
||||
{
|
||||
return id.compareTo(site.getId());
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (this == obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (obj == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getClass() != obj.getClass())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Site other = (Site) obj;
|
||||
return id.equals(other.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
public int compareTo(Site site)
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((id == null) ? 0 : id.hashCode());
|
||||
return result;
|
||||
}
|
||||
return id.compareTo(site.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Site [id=" + id + ", guid=" + guid + ", title=" + title
|
||||
+ ", description=" + description + ", visibility=" + visibility
|
||||
+ "]";
|
||||
}
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((id == null) ? 0 : id.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Site [id=" + id + ", guid=" + guid + ", title=" + title
|
||||
+ ", description=" + description + ", visibility=" + visibility
|
||||
+ "]";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user