public WorkspaceNavigationCommand(String commandName) {
super(commandName);
}
public String execute() throws Exception {
LocaleManager localeMgr = LocaleManager.lookup();
NavigationManager navMgr = NavigationManager.lookup();
UserStatus userCtx = navMgr.getUserStatus();
String commandName = getName();
if (WORKSPACE_ID.equals(commandName)) return navMgr.getCurrentWorkspaceId();
if (WORKSPACE_TITLE.equals(commandName)) return localeMgr.localize(navMgr.getCurrentWorkspace().getTitle()).toString();
if (PAGE_ID.equals(commandName)) return navMgr.getCurrentSectionId().toString();
if (PAGE_TITLE.equals(commandName)) return localeMgr.localize(navMgr.getCurrentSection().getTitle()).toString();
if (LANGUAGE.equals(commandName)) return localeMgr.getCurrentLang();
if (USER_LOGIN.equals(commandName)) return userCtx.getUserLogin();
if (USER_NAME.equals(commandName)) return userCtx.getUserName();
if (USER_EMAIL.equals(commandName)) return userCtx.getUserEmail();
return null;
}