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

net.anotheria.asg.generator.view.meta.MetaView Maven / Gradle / Ivy

package net.anotheria.asg.generator.view.meta;

import java.util.ArrayList;
import java.util.List;

import net.anotheria.asg.generator.IGenerateable;

/**
 * Meta description of the view.
 *
 * @author another
 * @version $Id: $Id
 */
public class MetaView implements IGenerateable{
	/**
	 * Name of the view.
	 */
	private String name;
	/**
	 * Flag for cms 2.0 version.
	 */
	private boolean cms20;
	
	//not used?
	//private boolean passwordProtected;
	/**
	 * Sections of the view.
	 */
	private List sections;
	/**
	 * Title of the view.
	 */
	private String title;
	/**
	 * List of roles required to access this view. Having any of the roles is sufficent to obtain access to the view. If no roles are specified, access is granted to 
	 * every editor.
	 */
	private List requiredRoles;
	/**
	 * Creates a new MetaView.
	 *
	 * @param aName a {@link java.lang.String} object.
	 */
	public MetaView(String aName){
		name = aName;
		sections = new ArrayList();
		requiredRoles = new ArrayList();
	}
	
// --- SOFAR NOT USED, HENCE OUTCOMMENTED 	
	/**
	 * @return
	 */
//	public boolean isPasswordProtected() {
	//	return passwordProtected;
	//}

	/**
	 * @param b
	 */
//	public void setPasswordProtected(boolean b) {
	//	passwordProtected = b;
	//}
//--- // END OUTCOMMENTED	
	
	/**
	 * Adds a section to this view.
	 *
	 * @param section a {@link net.anotheria.asg.generator.view.meta.MetaSection} object.
	 */
	public void addSection(MetaSection section){
		sections.add(section);	
	}

	/**
	 * 

Getter for the field sections.

* * @return sections which are part of this view */ public List getSections() { return sections; } /** *

Setter for the field sections.

* * @param list sections of the view */ public void setSections(List list) { sections = list; } /** {@inheritDoc} */ @Override public String toString(){ return "view "+name+", Roles: "+requiredRoles+", Sections: "+sections+" T: "+title; } /** *

Getter for the field name.

* * @return name of the view */ public String getName() { return name; } /** *

Getter for the field title.

* * @return title of the view */ public String getTitle() { return title; } /** *

Setter for the field title.

* * @param string title of the view */ public void setTitle(String string) { title = string; } /** *

Getter for the field requiredRoles.

* * @return a {@link java.util.List} object. */ public List getRequiredRoles() { return requiredRoles; } /** *

Setter for the field requiredRoles.

* * @param requiredRoles a {@link java.util.List} object. */ public void setRequiredRoles(List requiredRoles) { this.requiredRoles = requiredRoles; } /** *

isCms20.

* * @return flag for cms 2.0 version */ public boolean isCms20() { return cms20; } /** *

Setter for the field cms20.

* * @param cms20 flag for cms 2.0 version */ public void setCms20(boolean cms20) { this.cms20 = cms20; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy