uPortal 2.4.1
API Documentation

org.jasig.portal.layout.restrictions
Class PriorityRestriction

java.lang.Object
  extended byorg.jasig.portal.layout.restrictions.UserLayoutRestriction
      extended byorg.jasig.portal.layout.restrictions.PriorityRestriction
All Implemented Interfaces:
IUserLayoutRestriction

public class PriorityRestriction
extends UserLayoutRestriction

PriorityRestriction checks the priority restriction for a given ALNode object.

Version:
$Revision: 1.8 $
Author:
Michael Ivanov

Field Summary
 
Fields inherited from class org.jasig.portal.layout.restrictions.UserLayoutRestriction
LOCAL_RESTRICTION
 
Constructor Summary
PriorityRestriction()
           
PriorityRestriction(java.lang.String nodePath)
           
 
Method Summary
 boolean checkRestriction(ALNode node)
          Checks the restriction for the current node
 boolean checkRestriction(java.lang.String propertyValue)
          Checks the restriction for the specified node
 int getMaxValue()
          Returns the maximum value of the given restriction
 int getMinValue()
          Returns the minimum value of the given restriction
 int[] getRange()
          Returns the minimum and maximum values of the given restriction as an integer array
 int getRestrictionType()
          Returns the type of the current restriction
 void setRestriction(int minPriority, int maxPriority)
           
 
Methods inherited from class org.jasig.portal.layout.restrictions.UserLayoutRestriction
getRestrictionExpression, getRestrictionName, getRestrictionName, getRestrictionPath, setRestrictionExpression
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityRestriction

public PriorityRestriction(java.lang.String nodePath)

PriorityRestriction

public PriorityRestriction()
Method Detail

getMaxValue

public int getMaxValue()
Returns the maximum value of the given restriction

Returns:
a maxPriority

getMinValue

public int getMinValue()
Returns the minimum value of the given restriction

Returns:
a minPriority

getRange

public int[] getRange()
Returns the minimum and maximum values of the given restriction as an integer array

Returns:
an integer array

getRestrictionType

public int getRestrictionType()
Returns the type of the current restriction

Specified by:
getRestrictionType in interface IUserLayoutRestriction
Overrides:
getRestrictionType in class UserLayoutRestriction
Returns:
a restriction type respresented in the RestrictionTypes interface

checkRestriction

public boolean checkRestriction(java.lang.String propertyValue)
                         throws PortalException
Checks the restriction for the specified node

Specified by:
checkRestriction in interface IUserLayoutRestriction
Specified by:
checkRestriction in class UserLayoutRestriction
Parameters:
propertyValue - a String property value to be checked
Throws:
PortalException

checkRestriction

public boolean checkRestriction(ALNode node)
                         throws PortalException
Checks the restriction for the current node

Specified by:
checkRestriction in interface IUserLayoutRestriction
Overrides:
checkRestriction in class UserLayoutRestriction
Parameters:
node - a ALNode node
Returns:
a boolean value
Throws:
PortalException

setRestriction

public void setRestriction(int minPriority,
                           int maxPriority)

uPortal 2.4.1
API Documentation