Site Service: GET, PUT and DELETE methods implemented and unit tested for Membership resource

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9063 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2008-05-10 00:27:11 +00:00
parent 63674f3e8d
commit 344b703a61
3 changed files with 99 additions and 3 deletions

View File

@@ -30,8 +30,6 @@ import java.util.Map;
import org.alfresco.repo.jscript.ScriptableHashMap;
import org.alfresco.repo.site.SiteInfo;
import org.alfresco.repo.site.SiteService;
import org.jgroups.util.GetNetworkInterfaces1_4;
import org.mozilla.javascript.ScriptableObject;
/**
* Site JavaScript object
@@ -192,6 +190,30 @@ public class Site implements Serializable
return result;
}
/**
* Gets a user's role on this site.
* <p>
* If the user is not a member of the site then null is returned.
*
* @param userName user name
* @return String user's role or null if not a member
*/
public String getMembersRole(String userName)
{
return this.siteService.getMembersRole(getShortName(), userName);
}
/**
* Indicates whether a user is a member of the site.
*
* @param userName user name
* @return boolean true if the user is a member of the site, false otherwise
*/
public boolean isMember(String userName)
{
return this.siteService.isMember(getShortName(), userName);
}
/**
* Sets the membership details for a user.
* <p>