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

org.apache.archiva.redback.role.model.ModelTemplate Maven / Gradle / Ivy

There is a newer version: 2.6.2
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.7,
// any modifications will be overwritten.
// ==============================================================

package org.apache.archiva.redback.role.model;

/**
 * 
 *         model templates specify a role and its corresponding
 *         permissions, child roles and parent roles to link to,
 * however
 *         they are generated at runtime with additional input
 *       .
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ModelTemplate
    implements java.io.Serializable
{

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

    /**
     * Field id.
     */
    private String id;

    /**
     * Field namePrefix.
     */
    private String namePrefix;

    /**
     * Field delimiter.
     */
    private String delimiter = " - ";

    /**
     * description of this role.
     */
    private String description;

    /**
     * 
     *             boolean specifying if a given role can assigned
     *           .
     */
    private boolean assignable = false;

    /**
     * 
     *             boolean specifying if a given role can be
     * removed once
     *             created
     *           .
     */
    private boolean permanent = false;

    /**
     * 
     *             boolean specifying if the resource generated
     * with this template can be removed once
     *             created
     *           .
     */
    private boolean permanentResource = false;

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

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

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

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

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


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

    /**
     * Method addChildRole.
     * 
     * @param string
     */
    public void addChildRole( String string )
    {
        getChildRoles().add( string );
    } //-- void addChildRole( String )

    /**
     * Method addChildTemplate.
     * 
     * @param string
     */
    public void addChildTemplate( String string )
    {
        getChildTemplates().add( string );
    } //-- void addChildTemplate( String )

    /**
     * Method addParentRole.
     * 
     * @param string
     */
    public void addParentRole( String string )
    {
        getParentRoles().add( string );
    } //-- void addParentRole( String )

    /**
     * Method addParentTemplate.
     * 
     * @param string
     */
    public void addParentTemplate( String string )
    {
        getParentTemplates().add( string );
    } //-- void addParentTemplate( String )

    /**
     * Method addPermission.
     * 
     * @param modelPermission
     */
    public void addPermission( ModelPermission modelPermission )
    {
        getPermissions().add( modelPermission );
    } //-- void addPermission( ModelPermission )

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

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

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

        result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );

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

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

        return this.childRoles;
    } //-- java.util.List getChildRoles()

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

        return this.childTemplates;
    } //-- java.util.List getChildTemplates()

    /**
     * Get the delimiter field.
     * 
     * @return String
     */
    public String getDelimiter()
    {
        return this.delimiter;
    } //-- String getDelimiter()

    /**
     * Get description of this role.
     * 
     * @return String
     */
    public String getDescription()
    {
        return this.description;
    } //-- String getDescription()

    /**
     * Get the id field.
     * 
     * @return String
     */
    public String getId()
    {
        return this.id;
    } //-- String getId()

    /**
     * Get the namePrefix field.
     * 
     * @return String
     */
    public String getNamePrefix()
    {
        return this.namePrefix;
    } //-- String getNamePrefix()

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

        return this.parentRoles;
    } //-- java.util.List getParentRoles()

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

        return this.parentTemplates;
    } //-- java.util.List getParentTemplates()

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

        return this.permissions;
    } //-- java.util.List getPermissions()

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

        result = 37 * result + ( id != null ? id.hashCode() : 0 );

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

    /**
     * Get boolean specifying if a given role can assigned.
     * 
     * @return boolean
     */
    public boolean isAssignable()
    {
        return this.assignable;
    } //-- boolean isAssignable()

    /**
     * Get boolean specifying if a given role can be removed once
     *             created.
     * 
     * @return boolean
     */
    public boolean isPermanent()
    {
        return this.permanent;
    } //-- boolean isPermanent()

    /**
     * Get boolean specifying if the resource generated with this
     * template can be removed once
     *             created.
     * 
     * @return boolean
     */
    public boolean isPermanentResource()
    {
        return this.permanentResource;
    } //-- boolean isPermanentResource()

    /**
     * Method removeChildRole.
     * 
     * @param string
     */
    public void removeChildRole( String string )
    {
        getChildRoles().remove( string );
    } //-- void removeChildRole( String )

    /**
     * Method removeChildTemplate.
     * 
     * @param string
     */
    public void removeChildTemplate( String string )
    {
        getChildTemplates().remove( string );
    } //-- void removeChildTemplate( String )

    /**
     * Method removeParentRole.
     * 
     * @param string
     */
    public void removeParentRole( String string )
    {
        getParentRoles().remove( string );
    } //-- void removeParentRole( String )

    /**
     * Method removeParentTemplate.
     * 
     * @param string
     */
    public void removeParentTemplate( String string )
    {
        getParentTemplates().remove( string );
    } //-- void removeParentTemplate( String )

    /**
     * Method removePermission.
     * 
     * @param modelPermission
     */
    public void removePermission( ModelPermission modelPermission )
    {
        getPermissions().remove( modelPermission );
    } //-- void removePermission( ModelPermission )

    /**
     * Set boolean specifying if a given role can assigned.
     * 
     * @param assignable
     */
    public void setAssignable( boolean assignable )
    {
        this.assignable = assignable;
    } //-- void setAssignable( boolean )

    /**
     * Set the id of other role profiles to assign as children to
     * this
     *             role, can accept 'foo - ${resource}'.
     * 
     * @param childRoles
     */
    public void setChildRoles( java.util.List childRoles )
    {
        this.childRoles = childRoles;
    } //-- void setChildRoles( java.util.List )

    /**
     * Set the id of other templates to assign as children to this
     *             role, can accept 'foo - ${resource}'.
     * 
     * @param childTemplates
     */
    public void setChildTemplates( java.util.List childTemplates )
    {
        this.childTemplates = childTemplates;
    } //-- void setChildTemplates( java.util.List )

    /**
     * Set the delimiter field.
     * 
     * @param delimiter
     */
    public void setDelimiter( String delimiter )
    {
        this.delimiter = delimiter;
    } //-- void setDelimiter( String )

    /**
     * Set description of this role.
     * 
     * @param description
     */
    public void setDescription( String description )
    {
        this.description = description;
    } //-- void setDescription( String )

    /**
     * Set the id field.
     * 
     * @param id
     */
    public void setId( String id )
    {
        this.id = id;
    } //-- void setId( String )

    /**
     * Set the namePrefix field.
     * 
     * @param namePrefix
     */
    public void setNamePrefix( String namePrefix )
    {
        this.namePrefix = namePrefix;
    } //-- void setNamePrefix( String )

    /**
     * Set the id of other role profiles to have create a child
     *             relationship to this role, can accept 'foo -
     * ${resource}'.
     * 
     * @param parentRoles
     */
    public void setParentRoles( java.util.List parentRoles )
    {
        this.parentRoles = parentRoles;
    } //-- void setParentRoles( java.util.List )

    /**
     * Set the id of other templates to have create a child
     *             relationship to this role, can accept 'foo -
     * ${resource}'.
     * 
     * @param parentTemplates
     */
    public void setParentTemplates( java.util.List parentTemplates )
    {
        this.parentTemplates = parentTemplates;
    } //-- void setParentTemplates( java.util.List )

    /**
     * Set boolean specifying if a given role can be removed once
     *             created.
     * 
     * @param permanent
     */
    public void setPermanent( boolean permanent )
    {
        this.permanent = permanent;
    } //-- void setPermanent( boolean )

    /**
     * Set boolean specifying if the resource generated with this
     * template can be removed once
     *             created.
     * 
     * @param permanentResource
     */
    public void setPermanentResource( boolean permanentResource )
    {
        this.permanentResource = permanentResource;
    } //-- void setPermanentResource( boolean )

    /**
     * Set the permissions field.
     * 
     * @param permissions
     */
    public void setPermissions( java.util.List permissions )
    {
        this.permissions = permissions;
    } //-- void setPermissions( java.util.List )

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

        buf.append( "id = '" );
        buf.append( getId() );
        buf.append( "'" );

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy