package com.inepex.ineFrame.client.navigation;

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 Map<String, String> getUrlParameters(){
		return PlaceHandlerHelper.getUrlParameters(token);
	}
	
	public String createParentLevelMenuToken(){
		return PlaceHandlerHelper.createParentLevelMenuToken(token);
	}
	
	public String createSameLevelMenuToken(String... subMenuTokens) {
		return PlaceHandlerHelper.createSameLevelMenuToken(token, subMenuTokens);
	}
	
	public String getPlacePart(String currentFullToken) {
		return PlaceHandlerHelper.getPlacePart(currentFullToken);
	}
	
	public String getToken(){
		return token;
	}

}

@@ -588,30 +588,34 @@
 %0A%09%0D%0A%09public 
-String
+PlaceToken
  createParen
@@ -632,30 +632,32 @@
 Token()%7B%0D%0A%09%09
-return
+token = 
  PlaceHandle
@@ -692,32 +692,48 @@
 uToken(token);%0D%0A
+%09%09return this;%0D%0A
 %09%7D%0D%0A%09%0D%0A%09public S
@@ -731,22 +731,26 @@
 %09public 
-String
+PlaceToken
  createS
@@ -793,30 +793,31 @@
 okens) %7B%0D%0A%09%09
-return
+token =
  PlaceHandle
@@ -869,24 +869,44 @@
 nuTokens);%0D%0A
+%09%09return this;%0D%0A%09%09%0D%0A
 %09%7D%0D%0A%09%0D%0A%09publ

make PlaceToken more comfortable to use