BaseSurrogateImpl.java :  » Portal » uPortal-3.1.2 » org » jasig » portal » channels » jsp » tree » Java Open Source

Java Open Source » Portal » uPortal 3.1.2 
uPortal 3.1.2 » org » jasig » portal » channels » jsp » tree » BaseSurrogateImpl.java
/**
 * Copyright (c) 2000-2009, Jasig, Inc.
 * See license distributed with this file and available online at
 * https://www.ja-sig.org/svn/jasig-parent/tags/rel-10/license-header.txt
 */
package org.jasig.portal.channels.jsp.tree;

/**
 * A base class for surrogates providing default functionality that can be used
 * by subclasses if appropriate and alleviating them from having to implement 
 * identical methods to conform to the ISurrogate interface.
 * 
 * @author Mark Boyd
 */
public abstract class BaseSurrogateImpl implements ISurrogate
{

    /**
     * Returns null meaning that the domain object has no aspects.
     */
    public Object[] getAspects(Object o)
    {
        return null;
    }
    /**
     * Returns null meaning that the domain object has no children.
     */
    public Object[] getChildren(Object o)
    {
        return null;
    }
    /**
     * Returns null meaning that the domain object has no object specific label 
     * data for use in custome rendering.
     */
    public Object getLabelData(Object o)
    {
        return null;
    }
    /**
     * Returns false meaning that the domain object has no aspects.
     */
    public boolean hasAspects(Object o)
    {
        return false;
    }
    /**
     * Returns false meaning that the domain object has no children.
     */
    public boolean hasChildren(Object o)
    {
        return false;
    }
    /**
     * Returns false meaning that the domain object can't contain children.
     */
    public boolean canContainChildren(Object o)
    {
        return false;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.