org.sakaiproject.entitybroker.providers.model
Class EntitySite

java.lang.Object
  extended by org.sakaiproject.entitybroker.providers.model.EntitySite
All Implemented Interfaces:
Serializable, Comparable, org.sakaiproject.authz.api.AuthzGroup, org.sakaiproject.entity.api.Edit, org.sakaiproject.entity.api.Entity, org.sakaiproject.site.api.Site

@ReflectIgnoreClassFields(value={"createdBy","modifiedBy","properties","propertiesEdit","pages","members","orderedPages","roles","users","groups","url"})
public class EntitySite
extends Object
implements org.sakaiproject.site.api.Site

This is needed to allow RESTful access to the site data

Author:
Aaron Zeckoski (azeckoski @ gmail.com)
See Also:
Serialized Form

Field Summary
 Map<String,String> props
           
 
Fields inherited from interface org.sakaiproject.site.api.Site
PROP_SITE_CONTACT_EMAIL, PROP_SITE_CONTACT_NAME, PROP_SITE_TERM, PROP_SITE_TERM_EID
 
Fields inherited from interface org.sakaiproject.entity.api.Entity
SEPARATOR
 
Constructor Summary
EntitySite()
           
EntitySite(org.sakaiproject.site.api.Site site, boolean includeGroups)
           
EntitySite(String title, String shortDescription, String description, String iconUrl, String iconFullUrl, String infoUrl, String infoUrlFull, boolean joinable, String joinerRole, String maintainRole, String skin, boolean published, boolean pubView, String type, String providerGroupId, boolean customPageOrdered)
           
 
Method Summary
 org.sakaiproject.site.api.Group addGroup()
           
 void addMember(String arg0, String arg1, boolean arg2, boolean arg3)
           
 org.sakaiproject.site.api.SitePage addPage()
           
 org.sakaiproject.authz.api.Role addRole(String arg0)
           
 org.sakaiproject.authz.api.Role addRole(String arg0, org.sakaiproject.authz.api.Role arg1)
           
 int compareTo(Object o)
           
 org.sakaiproject.user.api.User getCreatedBy()
           
 Date getCreatedDate()
           
 org.sakaiproject.time.api.Time getCreatedTime()
           
 String getDescription()
           
 org.sakaiproject.site.api.Group getGroup(String arg0)
           
 Collection getGroups()
           
 Collection getGroupsWithMember(String arg0)
           
 Collection getGroupsWithMemberHasRole(String arg0, String arg1)
           
 String getIconUrl()
           
 String getIconUrlFull()
           
 String getId()
           
 String getInfoUrl()
           
 String getInfoUrlFull()
           
 String getJoinerRole()
           
 long getLastModified()
           
 String getMaintainRole()
           
 org.sakaiproject.authz.api.Member getMember(String arg0)
           
 Set getMembers()
           
 Collection<String> getMembersInGroups(Set<String> groupIds)
           
 org.sakaiproject.user.api.User getModifiedBy()
           
 Date getModifiedDate()
           
 org.sakaiproject.time.api.Time getModifiedTime()
           
 List getOrderedPages()
           
 String getOwner()
           
 org.sakaiproject.site.api.SitePage getPage(String arg0)
           
 List getPages()
           
 org.sakaiproject.entity.api.ResourceProperties getProperties()
           
 org.sakaiproject.entity.api.ResourcePropertiesEdit getPropertiesEdit()
           
 String getProperty(String key)
           
 Map<String,String> getProps()
           
 String getProviderGroupId()
           
 String getReference()
           
 String getReference(String arg0)
           
 org.sakaiproject.authz.api.Role getRole(String arg0)
           
 Set getRoles()
           
 Set getRolesIsAllowed(String arg0)
           
 String getShortDescription()
           
 List<EntityGroup> getSiteGroups()
           
 Owner getSiteOwner()
          Special method
 String getSkin()
           
 Date getSoftlyDeletedDate()
           
 String getTitle()
           
 org.sakaiproject.site.api.ToolConfiguration getTool(String arg0)
           
 org.sakaiproject.site.api.ToolConfiguration getToolForCommonId(String arg0)
           
 Collection getTools(String arg0)
           
 Collection getTools(String[] arg0)
           
 String getType()
           
 String getUrl()
           
 String getUrl(String arg0)
           
 org.sakaiproject.authz.api.Role getUserRole(String arg0)
           
 String[] getUserRoles()
           
 Set getUsers()
           
 Set getUsersHasRole(String arg0)
           
 Set getUsersIsAllowed(String arg0)
           
 boolean hasGroups()
           
 boolean hasRole(String arg0, String arg1)
           
 boolean isActiveEdit()
           
 boolean isAllowed(String arg0, String arg1)
           
 boolean isCustomPageOrdered()
           
 boolean isEmpty()
           
 boolean isJoinable()
           
 boolean isPublished()
           
 boolean isPubView()
           
 boolean isSoftlyDeleted()
           
 boolean isType(Object arg0)
           
 boolean keepIntersection(org.sakaiproject.authz.api.AuthzGroup arg0)
           
 void loadAll()
           
 void regenerateIds()
           
 void removeGroup(org.sakaiproject.site.api.Group arg0)
           
 void removeMember(String arg0)
           
 void removeMembers()
           
 void removePage(org.sakaiproject.site.api.SitePage arg0)
           
 void removeRole(String arg0)
           
 void removeRoles()
           
 void setCustomPageOrdered(boolean customPageOrdered)
           
 void setDescription(String description)
           
 void setIconUrl(String iconUrl)
           
 void setIconUrlFull(String iconUrlFull)
           
 void setId(String id)
           
 void setInfoUrl(String infoUrl)
           
 void setInfoUrlFull(String infoUrlFull)
           
 void setJoinable(boolean joinable)
           
 void setJoinerRole(String joinerRole)
           
 void setLastModified(long lastModified)
           
 void setMaintainRole(String maintainRole)
           
 void setOwner(String owner)
           
 void setProperty(String key, String value)
           
 void setProps(Map<String,String> props)
           
 void setProviderGroupId(String providerGroupId)
           
 void setPublished(boolean published)
           
 void setPubView(boolean pubView)
           
 void setShortDescription(String shortDescription)
           
 void setSiteGroupsList(List<EntityGroup> siteGroups)
           
 void setSkin(String skin)
           
 void setSoftlyDeleted(boolean arg0)
           
 void setTitle(String title)
           
 void setType(String type)
           
 void setUserRoles(String[] userRoles)
           
 Element toXml(Document arg0, Stack arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

public Map<String,String> props
Constructor Detail

EntitySite

public EntitySite()

EntitySite

public EntitySite(String title,
                  String shortDescription,
                  String description,
                  String iconUrl,
                  String iconFullUrl,
                  String infoUrl,
                  String infoUrlFull,
                  boolean joinable,
                  String joinerRole,
                  String maintainRole,
                  String skin,
                  boolean published,
                  boolean pubView,
                  String type,
                  String providerGroupId,
                  boolean customPageOrdered)

EntitySite

public EntitySite(org.sakaiproject.site.api.Site site,
                  boolean includeGroups)
Method Detail

getProps

public Map<String,String> getProps()

setProps

public void setProps(Map<String,String> props)

setProperty

public void setProperty(String key,
                        String value)

getProperty

public String getProperty(String key)

getId

public String getId()
Specified by:
getId in interface org.sakaiproject.entity.api.Entity

setId

public void setId(String id)

getOwner

public String getOwner()
Returns:
the id of the owner of this site (will match the created by user id)

setOwner

public void setOwner(String owner)

getSiteOwner

public Owner getSiteOwner()
Special method

Returns:
the owner data for the current site owner

getLastModified

public long getLastModified()

setLastModified

public void setLastModified(long lastModified)

getTitle

public String getTitle()
Specified by:
getTitle in interface org.sakaiproject.site.api.Site

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface org.sakaiproject.site.api.Site

getShortDescription

public String getShortDescription()
Specified by:
getShortDescription in interface org.sakaiproject.site.api.Site

setShortDescription

public void setShortDescription(String shortDescription)
Specified by:
setShortDescription in interface org.sakaiproject.site.api.Site

getDescription

public String getDescription()
Specified by:
getDescription in interface org.sakaiproject.authz.api.AuthzGroup
Specified by:
getDescription in interface org.sakaiproject.site.api.Site

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface org.sakaiproject.site.api.Site

getIconUrl

public String getIconUrl()
Specified by:
getIconUrl in interface org.sakaiproject.site.api.Site

setIconUrl

public void setIconUrl(String iconUrl)
Specified by:
setIconUrl in interface org.sakaiproject.site.api.Site

getInfoUrl

public String getInfoUrl()
Specified by:
getInfoUrl in interface org.sakaiproject.site.api.Site

setInfoUrl

public void setInfoUrl(String infoUrl)
Specified by:
setInfoUrl in interface org.sakaiproject.site.api.Site

getInfoUrlFull

public String getInfoUrlFull()
Specified by:
getInfoUrlFull in interface org.sakaiproject.site.api.Site

setInfoUrlFull

public void setInfoUrlFull(String infoUrlFull)

isJoinable

public boolean isJoinable()
Specified by:
isJoinable in interface org.sakaiproject.site.api.Site

setJoinable

public void setJoinable(boolean joinable)
Specified by:
setJoinable in interface org.sakaiproject.site.api.Site

getJoinerRole

public String getJoinerRole()
Specified by:
getJoinerRole in interface org.sakaiproject.site.api.Site

setJoinerRole

public void setJoinerRole(String joinerRole)
Specified by:
setJoinerRole in interface org.sakaiproject.site.api.Site

getSkin

public String getSkin()
Specified by:
getSkin in interface org.sakaiproject.site.api.Site

setSkin

public void setSkin(String skin)
Specified by:
setSkin in interface org.sakaiproject.site.api.Site

isPublished

public boolean isPublished()
Specified by:
isPublished in interface org.sakaiproject.site.api.Site

setPublished

public void setPublished(boolean published)
Specified by:
setPublished in interface org.sakaiproject.site.api.Site

getType

public String getType()
Specified by:
getType in interface org.sakaiproject.site.api.Site

setType

public void setType(String type)
Specified by:
setType in interface org.sakaiproject.site.api.Site

setIconUrlFull

public void setIconUrlFull(String iconUrlFull)

getMaintainRole

public String getMaintainRole()
Specified by:
getMaintainRole in interface org.sakaiproject.authz.api.AuthzGroup

setMaintainRole

public void setMaintainRole(String maintainRole)
Specified by:
setMaintainRole in interface org.sakaiproject.authz.api.AuthzGroup

getProviderGroupId

public String getProviderGroupId()
Specified by:
getProviderGroupId in interface org.sakaiproject.authz.api.AuthzGroup

setProviderGroupId

public void setProviderGroupId(String providerGroupId)
Specified by:
setProviderGroupId in interface org.sakaiproject.authz.api.AuthzGroup

isCustomPageOrdered

public boolean isCustomPageOrdered()
Specified by:
isCustomPageOrdered in interface org.sakaiproject.site.api.Site

setCustomPageOrdered

public void setCustomPageOrdered(boolean customPageOrdered)
Specified by:
setCustomPageOrdered in interface org.sakaiproject.site.api.Site

isPubView

public boolean isPubView()
Specified by:
isPubView in interface org.sakaiproject.site.api.Site

setPubView

public void setPubView(boolean pubView)
Specified by:
setPubView in interface org.sakaiproject.site.api.Site

getUserRoles

public String[] getUserRoles()

setUserRoles

public void setUserRoles(String[] userRoles)

getSiteGroups

public List<EntityGroup> getSiteGroups()

setSiteGroupsList

public void setSiteGroupsList(List<EntityGroup> siteGroups)

addGroup

public org.sakaiproject.site.api.Group addGroup()
Specified by:
addGroup in interface org.sakaiproject.site.api.Site

addPage

public org.sakaiproject.site.api.SitePage addPage()
Specified by:
addPage in interface org.sakaiproject.site.api.Site

getCreatedBy

public org.sakaiproject.user.api.User getCreatedBy()
Specified by:
getCreatedBy in interface org.sakaiproject.authz.api.AuthzGroup
Specified by:
getCreatedBy in interface org.sakaiproject.site.api.Site

getCreatedTime

public org.sakaiproject.time.api.Time getCreatedTime()
Specified by:
getCreatedTime in interface org.sakaiproject.authz.api.AuthzGroup
Specified by:
getCreatedTime in interface org.sakaiproject.site.api.Site

getCreatedDate

public Date getCreatedDate()
Specified by:
getCreatedDate in interface org.sakaiproject.authz.api.AuthzGroup

getGroup

public org.sakaiproject.site.api.Group getGroup(String arg0)
Specified by:
getGroup in interface org.sakaiproject.site.api.Site

getGroups

public Collection getGroups()
Specified by:
getGroups in interface org.sakaiproject.site.api.Site

getGroupsWithMember

public Collection getGroupsWithMember(String arg0)
Specified by:
getGroupsWithMember in interface org.sakaiproject.site.api.Site

getGroupsWithMemberHasRole

public Collection getGroupsWithMemberHasRole(String arg0,
                                             String arg1)
Specified by:
getGroupsWithMemberHasRole in interface org.sakaiproject.site.api.Site

getIconUrlFull

public String getIconUrlFull()
Specified by:
getIconUrlFull in interface org.sakaiproject.site.api.Site

getModifiedBy

public org.sakaiproject.user.api.User getModifiedBy()
Specified by:
getModifiedBy in interface org.sakaiproject.authz.api.AuthzGroup
Specified by:
getModifiedBy in interface org.sakaiproject.site.api.Site

getModifiedTime

public org.sakaiproject.time.api.Time getModifiedTime()
Specified by:
getModifiedTime in interface org.sakaiproject.authz.api.AuthzGroup
Specified by:
getModifiedTime in interface org.sakaiproject.site.api.Site

getModifiedDate

public Date getModifiedDate()
Specified by:
getModifiedDate in interface org.sakaiproject.authz.api.AuthzGroup

getOrderedPages

public List getOrderedPages()
Specified by:
getOrderedPages in interface org.sakaiproject.site.api.Site

getPage

public org.sakaiproject.site.api.SitePage getPage(String arg0)
Specified by:
getPage in interface org.sakaiproject.site.api.Site

getPages

public List getPages()
Specified by:
getPages in interface org.sakaiproject.site.api.Site

getTool

public org.sakaiproject.site.api.ToolConfiguration getTool(String arg0)
Specified by:
getTool in interface org.sakaiproject.site.api.Site

getToolForCommonId

public org.sakaiproject.site.api.ToolConfiguration getToolForCommonId(String arg0)
Specified by:
getToolForCommonId in interface org.sakaiproject.site.api.Site

getTools

public Collection getTools(String[] arg0)
Specified by:
getTools in interface org.sakaiproject.site.api.Site

getTools

public Collection getTools(String arg0)
Specified by:
getTools in interface org.sakaiproject.site.api.Site

hasGroups

public boolean hasGroups()
Specified by:
hasGroups in interface org.sakaiproject.site.api.Site

isType

public boolean isType(Object arg0)
Specified by:
isType in interface org.sakaiproject.site.api.Site

loadAll

public void loadAll()
Specified by:
loadAll in interface org.sakaiproject.site.api.Site

regenerateIds

public void regenerateIds()
Specified by:
regenerateIds in interface org.sakaiproject.site.api.Site

removeGroup

public void removeGroup(org.sakaiproject.site.api.Group arg0)
Specified by:
removeGroup in interface org.sakaiproject.site.api.Site

removePage

public void removePage(org.sakaiproject.site.api.SitePage arg0)
Specified by:
removePage in interface org.sakaiproject.site.api.Site

getPropertiesEdit

public org.sakaiproject.entity.api.ResourcePropertiesEdit getPropertiesEdit()
Specified by:
getPropertiesEdit in interface org.sakaiproject.entity.api.Edit

isActiveEdit

public boolean isActiveEdit()
Specified by:
isActiveEdit in interface org.sakaiproject.entity.api.Edit

getProperties

public org.sakaiproject.entity.api.ResourceProperties getProperties()
Specified by:
getProperties in interface org.sakaiproject.entity.api.Entity

getReference

public String getReference()
Specified by:
getReference in interface org.sakaiproject.entity.api.Entity

getReference

public String getReference(String arg0)
Specified by:
getReference in interface org.sakaiproject.entity.api.Entity

getUrl

public String getUrl()
Specified by:
getUrl in interface org.sakaiproject.entity.api.Entity

getUrl

public String getUrl(String arg0)
Specified by:
getUrl in interface org.sakaiproject.entity.api.Entity

toXml

@ReflectTransient
public Element toXml(Document arg0,
                                      Stack arg1)
Specified by:
toXml in interface org.sakaiproject.entity.api.Entity

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

addMember

public void addMember(String arg0,
                      String arg1,
                      boolean arg2,
                      boolean arg3)
Specified by:
addMember in interface org.sakaiproject.authz.api.AuthzGroup

addRole

public org.sakaiproject.authz.api.Role addRole(String arg0)
                                        throws org.sakaiproject.authz.api.RoleAlreadyDefinedException
Specified by:
addRole in interface org.sakaiproject.authz.api.AuthzGroup
Throws:
org.sakaiproject.authz.api.RoleAlreadyDefinedException

addRole

public org.sakaiproject.authz.api.Role addRole(String arg0,
                                               org.sakaiproject.authz.api.Role arg1)
                                        throws org.sakaiproject.authz.api.RoleAlreadyDefinedException
Specified by:
addRole in interface org.sakaiproject.authz.api.AuthzGroup
Throws:
org.sakaiproject.authz.api.RoleAlreadyDefinedException

getMember

public org.sakaiproject.authz.api.Member getMember(String arg0)
Specified by:
getMember in interface org.sakaiproject.authz.api.AuthzGroup

getMembers

public Set getMembers()
Specified by:
getMembers in interface org.sakaiproject.authz.api.AuthzGroup

getRole

public org.sakaiproject.authz.api.Role getRole(String arg0)
Specified by:
getRole in interface org.sakaiproject.authz.api.AuthzGroup

getRoles

public Set getRoles()
Specified by:
getRoles in interface org.sakaiproject.authz.api.AuthzGroup

getRolesIsAllowed

public Set getRolesIsAllowed(String arg0)
Specified by:
getRolesIsAllowed in interface org.sakaiproject.authz.api.AuthzGroup

getUserRole

public org.sakaiproject.authz.api.Role getUserRole(String arg0)
Specified by:
getUserRole in interface org.sakaiproject.authz.api.AuthzGroup

getUsers

public Set getUsers()
Specified by:
getUsers in interface org.sakaiproject.authz.api.AuthzGroup

getUsersHasRole

public Set getUsersHasRole(String arg0)
Specified by:
getUsersHasRole in interface org.sakaiproject.authz.api.AuthzGroup

getUsersIsAllowed

public Set getUsersIsAllowed(String arg0)
Specified by:
getUsersIsAllowed in interface org.sakaiproject.authz.api.AuthzGroup

hasRole

public boolean hasRole(String arg0,
                       String arg1)
Specified by:
hasRole in interface org.sakaiproject.authz.api.AuthzGroup

isAllowed

public boolean isAllowed(String arg0,
                         String arg1)
Specified by:
isAllowed in interface org.sakaiproject.authz.api.AuthzGroup

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface org.sakaiproject.authz.api.AuthzGroup

keepIntersection

public boolean keepIntersection(org.sakaiproject.authz.api.AuthzGroup arg0)
Specified by:
keepIntersection in interface org.sakaiproject.authz.api.AuthzGroup

removeMember

public void removeMember(String arg0)
Specified by:
removeMember in interface org.sakaiproject.authz.api.AuthzGroup

removeMembers

public void removeMembers()
Specified by:
removeMembers in interface org.sakaiproject.authz.api.AuthzGroup

removeRole

public void removeRole(String arg0)
Specified by:
removeRole in interface org.sakaiproject.authz.api.AuthzGroup

removeRoles

public void removeRoles()
Specified by:
removeRoles in interface org.sakaiproject.authz.api.AuthzGroup

getSoftlyDeletedDate

public Date getSoftlyDeletedDate()
Specified by:
getSoftlyDeletedDate in interface org.sakaiproject.site.api.Site

isSoftlyDeleted

public boolean isSoftlyDeleted()
Specified by:
isSoftlyDeleted in interface org.sakaiproject.site.api.Site

setSoftlyDeleted

public void setSoftlyDeleted(boolean arg0)
Specified by:
setSoftlyDeleted in interface org.sakaiproject.site.api.Site

getMembersInGroups

public Collection<String> getMembersInGroups(Set<String> groupIds)
Specified by:
getMembersInGroups in interface org.sakaiproject.site.api.Site


Copyright © 2007-2012 Sakai Project. All Rights Reserved.