de.deepamehta.plugins.accesscontrol.service
Interface AccessControlService

Show UML class diagram
All Superinterfaces:
PluginService
All Known Implementing Classes:
AccessControlPlugin

public interface AccessControlService
extends PluginService


Method Summary
 AccessControlList getACL(DeepaMehtaObject object)
          Returns the Access Control List of a topic or an association.
 Permissions getAssociationPermissions(long assocId)
           
 Collection<Association> getAssociationsByCreator(String username)
           
 Collection<Association> getAssociationsByOwner(String username)
           
 String getCreator(DeepaMehtaObject object)
          Returns the creator of a topic or an association.
 String getOwner(DeepaMehtaObject object)
          Returns the owner of a topic or an association.
 Permissions getTopicPermissions(long topicId)
           
 Collection<Topic> getTopicsByCreator(String username)
           
 Collection<Topic> getTopicsByOwner(String username)
           
 String getUsername()
          Returns the username of the logged in user.
 Topic getUsername(String username)
          Returns the "Username" topic for the specified username.
 void joinWorkspace(String username, long workspaceId)
           
 void joinWorkspace(Topic username, long workspaceId)
           
 void login()
          Checks weather the credentials in the authorization string match an existing User Account, and if so, creates an HTTP session.
 void logout()
          Logs the user out.
 void setACL(DeepaMehtaObject object, AccessControlList acl)
          Sets the Access Control List for a topic or an association.
 void setCreator(DeepaMehtaObject object, String username)
          Sets the creator of a topic or an association.
 void setOwner(DeepaMehtaObject object, String username)
          Sets the owner of a topic or an association.
 

Method Detail

login

void login()
Checks weather the credentials in the authorization string match an existing User Account, and if so, creates an HTTP session. ### FIXDOC

Parameters:
authHeader - the authorization string containing the credentials. ### FIXDOC Formatted like a "Authorization" HTTP header value. That is, "Basic " appended by the Base64 encoded form of "{username}:{password}".

logout

void logout()
Logs the user out. That is invalidating the session associated with the JSESSION ID cookie. For a "non-private" DM installation the response is 204 No Content. For a "private" DM installation the response is 401 Authorization Required. In this case the webclient is supposed to shutdown the DM GUI then. The webclient of a "private" DM installation must only be visible/usable when logged in.


getUsername

String getUsername()
Returns the username of the logged in user.

Returns:
The username, or null if no user is logged in.

getUsername

Topic getUsername(String username)
Returns the "Username" topic for the specified username.

Returns:
The "Username" topic (type dm4.accesscontrol.username), or null if no such username exists.

getTopicPermissions

Permissions getTopicPermissions(long topicId)

getAssociationPermissions

Permissions getAssociationPermissions(long assocId)

getCreator

String getCreator(DeepaMehtaObject object)
Returns the creator of a topic or an association.

Returns:
The username of the creator, or null if no creator is set.

setCreator

void setCreator(DeepaMehtaObject object,
                String username)
Sets the creator of a topic or an association.


getOwner

String getOwner(DeepaMehtaObject object)
Returns the owner of a topic or an association.

Returns:
The username of the owner, or null if no owner is set.

setOwner

void setOwner(DeepaMehtaObject object,
              String username)
Sets the owner of a topic or an association.


getACL

AccessControlList getACL(DeepaMehtaObject object)
Returns the Access Control List of a topic or an association.

Returns:
The Access Control List. If no one was set an empty Access Control List is returned.

setACL

void setACL(DeepaMehtaObject object,
            AccessControlList acl)
Sets the Access Control List for a topic or an association.


joinWorkspace

void joinWorkspace(String username,
                   long workspaceId)

joinWorkspace

void joinWorkspace(Topic username,
                   long workspaceId)

getTopicsByCreator

Collection<Topic> getTopicsByCreator(String username)

getTopicsByOwner

Collection<Topic> getTopicsByOwner(String username)

getAssociationsByCreator

Collection<Association> getAssociationsByCreator(String username)

getAssociationsByOwner

Collection<Association> getAssociationsByOwner(String username)


Copyright © 2014. All Rights Reserved.