ccc.api.jaxrs
Class SecurityImpl2

java.lang.Object
  extended by ccc.api.jaxrs.JaxrsCollection
      extended by ccc.api.jaxrs.SecurityImpl2
All Implemented Interfaces:
Security

public class SecurityImpl2
extends JaxrsCollection
implements Security

JAX-RS implementation of the security API.

Author:
Civic Computing Ltd.

Field Summary
 
Fields inherited from interface ccc.api.core.Security
COLLECTION, CURRENT, PROPERTIES
 
Constructor Summary
SecurityImpl2(Security delegate)
          Constructor.
 
Method Summary
 java.lang.Boolean isLoggedIn()
          Determine if a user is associated with the current session.
 java.lang.Boolean login(java.lang.String username, java.lang.String password)
          Log in to CCC.
 void logout()
          Log out from the current session.
 java.lang.String readAllProperties()
          Read the properties for the session.
 
Methods inherited from class ccc.api.jaxrs.JaxrsCollection
convertException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityImpl2

public SecurityImpl2(Security delegate)
Constructor.

Parameters:
delegate -
Method Detail

isLoggedIn

public java.lang.Boolean isLoggedIn()
Determine if a user is associated with the current session.

Specified by:
isLoggedIn in interface Security
Returns:
True if a user is associated, false otherwise.

login

public java.lang.Boolean login(java.lang.String username,
                               java.lang.String password)
Log in to CCC.

Specified by:
login in interface Security
Parameters:
username - The user's username.
password - The user's password.
Returns:
True if the login fails, false otherwise.

logout

public void logout()
Log out from the current session.

Specified by:
logout in interface Security

readAllProperties

public java.lang.String readAllProperties()
Read the properties for the session.

Specified by:
readAllProperties in interface Security
Returns:
The properties as a string.


Copyright © 2010. All Rights Reserved.