package com.inepex.ineFrame.client.navigation;

import java.util.List;
import java.util.Map;

public class PlaceToken {
	
	private String token;
	
	public PlaceToken(String token) {
		this.token = token;
	}
	
	public PlaceToken appendChild(String childToken){
		token = PlaceHandlerHelper.appendChild(token, childToken);
		return this;
	}
	
	public PlaceToken appendParam(String name, String value){
		token = PlaceHandlerHelper.appendParam(token, name, value);
		return this;
	}
	
	public PlaceToken appendParam(String name, List<String> value) {
		token = PlaceHandlerHelper.appendParam(token, name, value);
		return this;
	}
	
	public Map<String, String> getUrlParameters(){
		return PlaceHandlerHelper.getUrlParameters(token);
	}
	
	public PlaceToken createParentLevelMenuToken(){
		token =  PlaceHandlerHelper.createParentLevelMenuToken(token);
		return this;
	}
	
	public PlaceToken createSameLevelMenuToken(String... subMenuTokens) {
		token = PlaceHandlerHelper.createSameLevelMenuToken(token, subMenuTokens);
		return this;
		
	}
	
	public String getPlacePart(String currentFullToken) {
		return PlaceHandlerHelper.getPlacePart(currentFullToken);
	}
	
	public String getToken(){
		return token;
	}
}

@@ -1250,11 +1250,76 @@
 n;%0D%0A%09%7D%0D%0A
+%09%0D%0A%09@Override%0D%0A%09public String toString() %7B%0D%0A%09%09return token;%0D%0A%09%7D%0D%0A
 %7D%0D%0A

create share group page and its handlers https://trac.inetrack.com/ticket/1601 refs #1601