All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.doxia.site.Body Maven / Gradle / Ivy

The newest version!
/*
 =================== DO NOT EDIT THIS FILE ====================
 
 Generated by Modello 2.4.0,
 
 any modifications will be overwritten.
 
 ==============================================================
 */

package org.apache.maven.doxia.site;

/**
 * The main content.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class Body
    implements java.io.Serializable, java.lang.Cloneable
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Additional content (like JavaScript) to include in the HEAD
     * block of the generated pages.
     */
    private String head;

    /**
     * Field links.
     */
    private java.util.List links;

    /**
     * Field breadcrumbs.
     */
    private java.util.List breadcrumbs;

    /**
     * Field menus.
     */
    private java.util.List menus;

    /**
     * If present, the contained text will be used instead of the
     * generated copyright text.
     */
    private String footer;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addBreadcrumb.
     * 
     * @param linkItem a linkItem object.
     */
    public void addBreadcrumb( LinkItem linkItem )
    {
        getBreadcrumbs().add( linkItem );
    } //-- void addBreadcrumb( LinkItem )

    /**
     * Method addLink.
     * 
     * @param linkItem a linkItem object.
     */
    public void addLink( LinkItem linkItem )
    {
        getLinks().add( linkItem );
    } //-- void addLink( LinkItem )

    /**
     * Method addMenu.
     * 
     * @param menu a menu object.
     */
    public void addMenu( Menu menu )
    {
        getMenus().add( menu );
    } //-- void addMenu( Menu )

    /**
     * Method clone.
     * 
     * @return Body
     */
    public Body clone()
    {
        try
        {
            Body copy = (Body) super.clone();

            if ( this.links != null )
            {
                copy.links = new java.util.ArrayList();
                for ( LinkItem item : this.links )
                {
                    copy.links.add( ( (LinkItem) item).clone() );
                }
            }

            if ( this.breadcrumbs != null )
            {
                copy.breadcrumbs = new java.util.ArrayList();
                for ( LinkItem item : this.breadcrumbs )
                {
                    copy.breadcrumbs.add( ( (LinkItem) item).clone() );
                }
            }

            if ( this.menus != null )
            {
                copy.menus = new java.util.ArrayList();
                for ( Menu item : this.menus )
                {
                    copy.menus.add( ( (Menu) item).clone() );
                }
            }

            return copy;
        }
        catch ( java.lang.Exception ex )
        {
            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
                + " does not support clone()" ).initCause( ex );
        }
    } //-- Body clone()

    /**
     * Method equals.
     * 
     * @param other a other object.
     * @return boolean
     */
    public boolean equals( Object other )
    {
        if ( this == other )
        {
            return true;
        }

        if ( !( other instanceof Body ) )
        {
            return false;
        }

        Body that = (Body) other;
        boolean result = true;

        result = result && ( getHead() == null ? that.getHead() == null : getHead().equals( that.getHead() ) );
        result = result && ( getLinks() == null ? that.getLinks() == null : getLinks().equals( that.getLinks() ) );
        result = result && ( getBreadcrumbs() == null ? that.getBreadcrumbs() == null : getBreadcrumbs().equals( that.getBreadcrumbs() ) );
        result = result && ( getMenus() == null ? that.getMenus() == null : getMenus().equals( that.getMenus() ) );
        result = result && ( getFooter() == null ? that.getFooter() == null : getFooter().equals( that.getFooter() ) );

        return result;
    } //-- boolean equals( Object )

    /**
     * Method getBreadcrumbs.
     * 
     * @return List
     */
    public java.util.List getBreadcrumbs()
    {
        if ( this.breadcrumbs == null )
        {
            this.breadcrumbs = new java.util.ArrayList();
        }

        return this.breadcrumbs;
    } //-- java.util.List getBreadcrumbs()

    /**
     * Get if present, the contained text will be used instead of
     * the generated copyright text.
     * 
     * @return String
     */
    public String getFooter()
    {
        return this.footer;
    } //-- String getFooter()

    /**
     * Get additional content (like JavaScript) to include in the
     * HEAD block of the generated pages.
     * 
     * @return String
     */
    public String getHead()
    {
        return this.head;
    } //-- String getHead()

    /**
     * Method getLinks.
     * 
     * @return List
     */
    public java.util.List getLinks()
    {
        if ( this.links == null )
        {
            this.links = new java.util.ArrayList();
        }

        return this.links;
    } //-- java.util.List getLinks()

    /**
     * Method getMenus.
     * 
     * @return List
     */
    public java.util.List getMenus()
    {
        if ( this.menus == null )
        {
            this.menus = new java.util.ArrayList();
        }

        return this.menus;
    } //-- java.util.List getMenus()

    /**
     * Method hashCode.
     * 
     * @return int
     */
    public int hashCode()
    {
        int result = 17;

        result = 37 * result + ( head != null ? head.hashCode() : 0 );
        result = 37 * result + ( links != null ? links.hashCode() : 0 );
        result = 37 * result + ( breadcrumbs != null ? breadcrumbs.hashCode() : 0 );
        result = 37 * result + ( menus != null ? menus.hashCode() : 0 );
        result = 37 * result + ( footer != null ? footer.hashCode() : 0 );

        return result;
    } //-- int hashCode()

    /**
     * Method removeBreadcrumb.
     * 
     * @param linkItem a linkItem object.
     */
    public void removeBreadcrumb( LinkItem linkItem )
    {
        getBreadcrumbs().remove( linkItem );
    } //-- void removeBreadcrumb( LinkItem )

    /**
     * Method removeLink.
     * 
     * @param linkItem a linkItem object.
     */
    public void removeLink( LinkItem linkItem )
    {
        getLinks().remove( linkItem );
    } //-- void removeLink( LinkItem )

    /**
     * Method removeMenu.
     * 
     * @param menu a menu object.
     */
    public void removeMenu( Menu menu )
    {
        getMenus().remove( menu );
    } //-- void removeMenu( Menu )

    /**
     * Set a list of breadcrumbs to display in the navigation.
     * 
     * @param breadcrumbs a breadcrumbs object.
     */
    public void setBreadcrumbs( java.util.List breadcrumbs )
    {
        this.breadcrumbs = breadcrumbs;
    } //-- void setBreadcrumbs( java.util.List )

    /**
     * Set if present, the contained text will be used instead of
     * the generated copyright text.
     * 
     * @param footer a footer object.
     */
    public void setFooter( String footer )
    {
        this.footer = footer;
    } //-- void setFooter( String )

    /**
     * Set additional content (like JavaScript) to include in the
     * HEAD block of the generated pages.
     * 
     * @param head a head object.
     */
    public void setHead( String head )
    {
        this.head = head;
    } //-- void setHead( String )

    /**
     * Set a list of links to display in the navigation.
     * 
     * @param links a links object.
     */
    public void setLinks( java.util.List links )
    {
        this.links = links;
    } //-- void setLinks( java.util.List )

    /**
     * Set a list of menus to include in the navigation.
     * 
     * @param menus a menus object.
     */
    public void setMenus( java.util.List menus )
    {
        this.menus = menus;
    } //-- void setMenus( java.util.List )

    /**
     * Method toString.
     * 
     * @return String
     */
    public java.lang.String toString()
    {
        StringBuilder buf = new StringBuilder( 128 );

        buf.append( "head = '" );
        buf.append( getHead() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "links = '" );
        buf.append( getLinks() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "breadcrumbs = '" );
        buf.append( getBreadcrumbs() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "menus = '" );
        buf.append( getMenus() );
        buf.append( "'" );
        buf.append( "\n" ); 
        buf.append( "footer = '" );
        buf.append( getFooter() );
        buf.append( "'" );

        return buf.toString();
    } //-- java.lang.String toString()

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy