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

net.sf.ahtutils.controller.util.query.AclQuery Maven / Gradle / Ivy

package net.sf.ahtutils.controller.util.query;

import java.util.Hashtable;
import java.util.Map;

import net.sf.ahtutils.xml.access.Role;
import net.sf.ahtutils.xml.aht.Query;

public class AclQuery
{
	public static enum Key {ProjectRole}
	
	private static Map mQueries;
	
	public static Query get(Key key,String lang)
	{
		if(mQueries==null){mQueries = new Hashtable();}
		if(!mQueries.containsKey(key))
		{
			switch(key)
			{
				case ProjectRole: mQueries.put(key, createProjectRole());break;
			}
		}
		Query q = mQueries.get(key);
		q.setLang(lang);
		return q;
	}
	
	public static Query createProjectRole()
	{
		Role r = new Role();
		r.setCode("");
		r.setName("");
    	
		Query q = new Query();
    	q.setRole(r);
    	return q;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy