| java.lang.Object org.acegisecurity.vote.InterfaceBasedLabelParameterStrategy
InterfaceBasedLabelParameterStrategy | public class InterfaceBasedLabelParameterStrategy implements LabelParameterStrategy(Code) | | This is a very useful implementation of the LabelParameterStrategy. Data objects which are meant to be labeled
should implement the LabeledData interface. This strategy will then castdown to that interface for either testing
or retrieval of the label.
author: Greg Turnquist version: $Id: InterfaceBasedLabelParameterStrategy.java 1750 2006-11-14 22:07:36Z benalex $ |
getLabel | public String getLabel(Method method, Object arg)(Code) | | Test if the argument is labeled, and if so, downcast to LabeledData and retrieve the domain object's
labeled value. Otherwise, return an empty string. NOTE: The default for no label is an empty string. If somehow
the user wants to make that a label itself, he or she must inject an alternate value to the noLabel property.
Parameters: method - DOCUMENT ME! Parameters: arg - DOCUMENT ME! DOCUMENT ME! |
isLabeled | public boolean isLabeled(Method method, Object arg)(Code) | | Test if the argument implemented the LabeledData interface. NOTE: The invoking method has no bearing for
this strategy, only the argument itself.
Parameters: method - DOCUMENT ME! Parameters: arg - DOCUMENT ME! DOCUMENT ME! |
|
|