AgentTabManager.java revision e8721886dbfd32e88cc7077cbee4b6bb1b44b443
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: AgentTabManager.java,v 1.2 2008/06/25 05:42:44 qcheng Exp $
*
*/
/**
* Agent Tab Manager.
*/
public class AgentTabManager {
private AgentTabManager() {
initInstance();
}
/**
* Returns an instance of agent tab manager.
*
* @return an instance of agent tab manager.
*/
public static AgentTabManager getInstance() {
return instance;
}
/**
* Returns map of section name to a set of attribute names of a given tab.
*
* @param agentType Type of agent.
* @param tabId Tab Id.
* @return map of section name to a set of attribute names of a given tab.
*/
}
}
return results;
}
/**
* Returns tabs of a given agent type.
*
* @param agentType Type of agent.
* @return tabs of a given agent type.
*/
}
/**
* Returns default tab Id of a given agent type.
*
* @param agentType Type of agent.
* @return default tab Id of a given agent type.
*/
}
/**
* Returns order of sections of a given tab.
*
* @param agentType Type of agent.
* @param tab Tab Id.
* @return order of sections of a given agent type.
*/
} else {
return null;
}
}
/**
* Returns <code>true</code> if the tab is the first one.
*
* @param agentType Type of agent.
* @param tab Name of tab
* @return <code>true</code> if the tab is the first one.
*/
}
private void initInstance() {
}
}
while (st.hasMoreTokens()) {
}
while (st.hasMoreTokens()) {
}
}
}
}
}
if (mapAgentType == null) {
mapAgentType = new TreeMap();
}
}
if (mapSection == null) {
mapSection = new TreeSet();
}
}
}
private Map getTabProperties() {
try {
}
}
}
} catch (IOException e) {
} finally {
try {
} catch (IOException ioe) {
// do nothing
}
}
}
return map;
}
/**
* Returns tab name.
*
* @param tabIdx Tab Id.
* @return tab name.
*/
}
/**
* Returns tab Id.
*
* @param tabName Tab name.
* @return tab Id.
* */
int idx = -1;
}
}
return idx;
}
}