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

org.openmbee.mms.twc.TeamworkCloudEndpoints Maven / Gradle / Ivy

There is a newer version: 4.0.20
Show newest version
package org.openmbee.mms.twc;

public enum TeamworkCloudEndpoints {
    LOGIN("login"),
    GETROLESID("resources/%s/roles"),
    GETPROJECTUSERS("workspaces/%s/resources/%s/roles/%s/users");

    private String path;

    public String getPath() {
        return path;
    }
    
    TeamworkCloudEndpoints(){
    	
    }

    TeamworkCloudEndpoints(String path){
        this.path = path;
    }
    
    
    public String buildUrl(TeamworkCloud twc,String ...params){
    	String url = String.format("%s://%s:%s/osmc/%s", twc.getProtocol(), twc.getUrl(), twc.getPort(), getPath());
    	
    	if(params == null) {
    		return url;
    	}

        return String.format(url, (Object[]) params);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy