uri-resolver-manager/src/main/java/org/gcube/portlets/user/uriresolvermanager/UriResolveManager.java

65 lines
1.4 KiB
Java

/**
*
*/
package org.gcube.portlets.user.uriresolvermanager;
import java.util.Map;
import java.util.Set;
import org.gcube.portlets.user.uriresolvermanager.type.ApplicationTypePropertyReader;
import org.gcube.portlets.user.uriresolvermanager.type.PropertyFileNotFoundException;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* @Oct 14, 2014
*
*/
public class UriResolveManager {
private ApplicationTypePropertyReader applicationTypeReader;
private String userApplicationType;
private Map<String, String> applicationTypes;
/**
*
* @param scope
* @param applicationType a key Application Type
*/
public UriResolveManager(String scope, String applicationType){
try {
this.applicationTypes = new ApplicationTypePropertyReader().getApplicationTypes();
this.userApplicationType = applicationType;
if(!this.applicationTypeReader.getApplicationTypes().containsKey(applicationType)){
}
} catch (PropertyFileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
*
* @return the Application Types availables
*/
public Set<String> getApplicationTypes(){
return this.applicationTypes.keySet();
}
/**
*
* @return a map Application Type - Resource Name
*/
public Map<String, String> getCapabilities(){
return this.applicationTypes;
}
}