Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.publication.bean
Class PublicationPermissionRule  view PublicationPermissionRule download PublicationPermissionRule.java

java.lang.Object
  extended bycom.RuntimeCollective.permission.bean.SimplePermissionRule
      extended bycom.RuntimeCollective.publication.bean.PublicationPermissionRule
All Implemented Interfaces:
com.RuntimeCollective.webapps.bean.EntityBean, com.RuntimeCollective.permission.bean.PermissionRule, java.io.Serializable

public class PublicationPermissionRule
extends com.RuntimeCollective.permission.bean.SimplePermissionRule

A subclass of SimplePermissionRule, which adds checks on:
- whether the User has a current registration for the RequiredPublication

Version:
$Id: PublicationPermissionRule.java,v 1.4 2003/09/30 15:12:52 joe Exp $

Field Summary
static java.lang.String DATABASE_TABLE
          The name of the database table for this bean type.
static java.lang.String DELETE_FROM
           
protected  int RequiredPublicationId
          The Publication the User should be subscribed to.
static java.lang.String SELECT_DATA
           
static java.lang.String SELECT_ID
           
static java.lang.String T_WHERE_ID
           
static java.lang.String T_WHERE_PUB
           
static java.lang.String WHERE_ID
           
 
Fields inherited from class com.RuntimeCollective.permission.bean.SimplePermissionRule
id, Key, NeedLogin
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
PublicationPermissionRule()
          Construct a new blank PublicationPermissionRule, giving it a new unique ID.
PublicationPermissionRule(int id)
          Get a current PublicationPermissionRule from the RuntimeDataSource, given an id.
 
Method Summary
 void delete()
          Delete this bean from the database.
protected  java.lang.String getAuthorisationPath(com.RuntimeCollective.webapps.bean.User user)
          Get the path of the page where the user should be sent in order to (maybe) get authorised.
 Publication getRequiredPublication()
          Get the Publication
static PublicationPermissionRule getRuleForPublication(Publication publication)
          Get an PublicationPermissionRule for a given Publication.
 void save()
          Save this bean to the database.
 void setRequiredPublication(Publication requiredPublication)
          Set the Publication
 
Methods inherited from class com.RuntimeCollective.permission.bean.SimplePermissionRule
accepts, getAuthorisationPath, getAuthorisationPath, getId, getKey, getNeedLogin, getPathToLogon, getPathToRelogon, setId, setKey, setNeedLogin, setReturnUrl, setReturnUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATABASE_TABLE

public static final java.lang.String DATABASE_TABLE
The name of the database table for this bean type.

See Also:
Constant Field Values

DELETE_FROM

public static java.lang.String DELETE_FROM

WHERE_ID

public static java.lang.String WHERE_ID

SELECT_DATA

public static java.lang.String SELECT_DATA

T_WHERE_ID

public static java.lang.String T_WHERE_ID

SELECT_ID

public static java.lang.String SELECT_ID

T_WHERE_PUB

public static java.lang.String T_WHERE_PUB

RequiredPublicationId

protected int RequiredPublicationId
The Publication the User should be subscribed to.

Constructor Detail

PublicationPermissionRule

public PublicationPermissionRule()
Construct a new blank PublicationPermissionRule, giving it a new unique ID.


PublicationPermissionRule

public PublicationPermissionRule(int id)
Get a current PublicationPermissionRule from the RuntimeDataSource, given an id.

Method Detail

save

public void save()
Save this bean to the database.


delete

public void delete()
Delete this bean from the database.


getAuthorisationPath

protected java.lang.String getAuthorisationPath(com.RuntimeCollective.webapps.bean.User user)
Get the path of the page where the user should be sent in order to (maybe) get authorised.

On submission of that page, the user should be checked again, as there may be more than one page to go to.


setRequiredPublication

public void setRequiredPublication(Publication requiredPublication)
Set the Publication


getRequiredPublication

public Publication getRequiredPublication()
Get the Publication


getRuleForPublication

public static PublicationPermissionRule getRuleForPublication(Publication publication)
Get an PublicationPermissionRule for a given Publication. This queries the db every time.