001: package com.sun.portal.rproxy.admin.model;
002:
003: import java.util.List;
004: import com.sun.portal.log.common.PortalLogger;
005: import java.util.Map;
006: import java.util.Set;
007:
008: import com.iplanet.sso.SSOException;
009: import com.iplanet.am.console.base.model.AMModel;
010: import com.iplanet.am.console.base.model.AMConsoleException;
011:
012: /**
013: * The interface uses by the create rule view bean to create
014: * a new ruleset XML.
015: */
016: public interface GatewayModel extends AMModel {
017:
018: /*
019: * Returns the number of attributes in the view.
020: *
021: * @param viewType - GLOBAL_TYPE
022: * @return Number of attributes in the view.
023: */
024: int getSize();
025:
026: /*
027: * Method to make the model collect and cache the different attribute
028: * schemas.
029: */
030: void process(String configName);
031:
032: /*
033: * Method to store the attributes in the backend.
034: * @param viewType - GLOBAL_TYPE
035: * @param map A map of {String attrName, Set attrValues}
036: * @return True if successful.
037: */
038: boolean store(String configName, Map map) throws SSOException;
039:
040: /*
041: * @return The title of this view.
042: */
043: String getTitle();
044:
045: /**
046: * @return The service name.
047: */
048: String getServiceName();
049:
050: /**
051: * @returns Returns true if service has schema (org or dyn).
052: */
053: boolean hasSchema();
054:
055: /*
056: * Sets the current row in the model, so that all attribute specific
057: * calls return the attribute information for the specified row number.
058: * This method must be called before making any row specific
059: * attribute calls.
060: *
061: * @param viewType One of GLOBAL_TYPE, ORG_TYPE, DYNAMIC_TYPE
062: * @param row The row number.
063: * @return True if successful.
064: */
065: boolean setCurrentRow(int row);
066:
067: /*
068: * Current row must have been set using setCurrentRow method.
069: *
070: * @return The name of the attribute in the current row.
071: */
072: String getAttrName();
073:
074: /*
075: * Current row must have been set using setCurrentRow method.
076: *
077: * @return The localized label of the attribute in the current row.
078: */
079: String getAttrLabel();
080:
081: /*
082: * Current row must have been set using setCurrentRow method.
083: *
084: * @return The type of the attribute from attribute schema in current row.
085: */
086: int getAttrType();
087:
088: /*
089: * Current row must have been set using setCurrentRow method.
090: *
091: * @return The syntax of the attribute from attribute schema in current row.
092: */
093: int getAttrSyntax();
094:
095: /*
096: * Current row must have been set using setCurrentRow method.
097: *
098: * @return Set of attribute values in current row.
099: */
100: Set getAttrValues();
101:
102: /*
103: * Current row must have been set using setCurrentRow method.
104: *
105: * @return The string array of choices in current row.
106: */
107: String[] getAttrChoices();
108:
109: /*
110: * Current row must have been set using setCurrentRow method.
111: *
112: * @return The string for true condition of a boolean type in current row.
113: */
114: String getAttrTrueValue();
115:
116: /*
117: * Current row must have been set using setCurrentRow method.
118: *
119: * @return The string for false condition of a boolean type in current row.
120: */
121: String getAttrFalseValue();
122:
123: /*
124: * Returns all the Gateway profile names
125: */
126: Set getConfigNames();
127:
128: /*
129: * Creates new Gateway profile with the old configuration
130: */
131: boolean store(String newConfigName, String oldConfigName);
132:
133: /*
134: * Deletes the Gateway configuration
135: */
136: public void deleteConfig(String[] config) throws Exception;
137:
138: /*
139: * Returns Number of Gateway profiles currently present in the service schema
140: */
141: public int getGatewayProfileCount();
142:
143: /**
144: * gets the date in the default locale.
145: *
146: * @param dates a set of date strings
147: * @return a set of date strings in the default locale.
148: */
149: public Set getDateInDefaultLocale(Set dates)
150: throws AMConsoleException;
151:
152: public int getGWAttributeIndex(String attr);
153:
154: public String getHelpUrl(String docName);
155:
156: public String getHelpAnchorTag(String key);
157: }
|