org.deltava.security.command
Class BlogAccessControl

java.lang.Object
  extended by org.deltava.security.command.AccessControl
      extended by org.deltava.security.command.BlogAccessControl

public class BlogAccessControl
extends AccessControl

An Access Controller for blog entries.

Since:
1.0
Version:
1.0
Author:
Luke

Field Summary
 
Fields inherited from class org.deltava.security.command.AccessControl
_ctx
 
Constructor Summary
BlogAccessControl(SecurityContext ctx, Entry e)
          Initialize the Access Controller.
 
Method Summary
 boolean getCanComment()
          Returns whether the user can comment on the current blog entry.
 boolean getCanCreate()
          Returns whether the user can create a new blog entry.
 boolean getCanDelete()
          Returns whether the user can delete the current blog entry.
 boolean getCanEdit()
          Returns whether the user can edit the current blog entry.
 void validate()
          Calculates access roles.
 
Methods inherited from class org.deltava.security.command.AccessControl
validateContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlogAccessControl

public BlogAccessControl(SecurityContext ctx,
                         Entry e)
Initialize the Access Controller.

Parameters:
ctx - the security context
e - the blog Entry bean
Method Detail

validate

public void validate()
              throws CommandException
Calculates access roles.

Specified by:
validate in class AccessControl
Throws:
CommandException - if the entry cannot be read

getCanCreate

public boolean getCanCreate()
Returns whether the user can create a new blog entry.

Returns:
TRUE if an entry can be created, otherwise FALSE

getCanEdit

public boolean getCanEdit()
Returns whether the user can edit the current blog entry.

Returns:
TRUE if the entry can be edited, otherwise FALSE

getCanComment

public boolean getCanComment()
Returns whether the user can comment on the current blog entry.

Returns:
TRUE if the entry can be commented on, otherwise FALSE

getCanDelete

public boolean getCanDelete()
Returns whether the user can delete the current blog entry.

Returns:
TRUE if the entry can be deleted, otherwise FALSE


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.