001: package com.sun.portal.fabric.mbeans;
002:
003: import com.sun.portal.log.common.LoggerDetails;
004:
005: import java.util.Hashtable;
006: import java.util.List;
007: import java.util.Vector;
008:
009: /**
010: *
011: */
012: public interface PortalLogConfiguratorMBean {
013:
014: public static final String TYPE = PortalDomainMBean.TYPE
015: + ".PortalLogConfigurator";
016:
017: // Any new methods being added to this for log console purposes, the same method
018: // needs to be added to the PortalLogConfigHostBridgeMBean
019:
020: /**
021: * List the portal loggers. The logger names start with "debug."
022: *
023: * @param componentName the name of the component
024: * eg: portal, search, pas, gateway, rwproxy, nlproxy
025: * @param componentID the ID of the component
026: * portal - Portal ID
027: * search - Search Server ID
028: * pas - not applicable
029: * gateway,rwproxy,nlproxy - Host name
030: * @param instance the name of the instance
031: * portal - Instance ID
032: * search - not applicable
033: * pas - not applicable
034: * gateway,rwproxy,nlproxy - profile ID
035: * @return list of logger names.
036: */
037: public Vector listPSLoggers(String componentName,
038: String componentID, String instance, Boolean detail)
039: throws Exception;
040:
041: /**
042: * Sets the level for the logger.
043: *
044: * @param componentName the name of the component
045: * eg: portal, search, pas, gateway, rwproxy, nlproxy
046: * @param componentID the ID of the component
047: * portal - Portal ID
048: * search - Search Server ID
049: * pas - not applicable
050: * gateway,rwproxy,nlproxy - Host name
051: * @param instance the name of the instance
052: * portal - Instance ID
053: * search - not applicable
054: * pas - not applicable
055: * gateway,rwproxy,nlproxy - profile ID
056: * @param loggerName the name of the logger
057: * @param level the level for the logger
058: */
059: public void setLevel(String componentName, String componentID,
060: String instance, String loggerName, String level)
061: throws Exception;
062:
063: /**
064: * Sets a separate file for the logger at the level specified.
065: * No stack-trace is logged for the levels INFO and below.
066: * The content does not go to the file associated with the parent logger.
067: *
068: * @param componentName the name of the component
069: * eg: portal, search, pas, gateway, rwproxy, nlproxy
070: * @param componentID the ID of the component
071: * portal - Portal ID
072: * search - Search Server ID
073: * pas - not applicable
074: * gateway,rwproxy,nlproxy - Host name
075: * @param instance the name of the instance
076: * portal - Instance ID
077: * search - not applicable
078: * pas - not applicable
079: * gateway,rwproxy,nlproxy - profile ID
080: * @param loggerName the name of the logger
081: * @param level the level for the logger
082: * @param printStackTrace specifies whether the stack trace is to be printed
083: * @param logInParent specifies whether the content has to logged in the parent
084: */
085: public void setSeparateLogFile(String componentName,
086: String componentID, String instance, String loggerName,
087: String level, Boolean printStackTrace, Boolean logInParent)
088: throws Exception;
089:
090: /**
091: * Resets the level of the logger to that of the root logger.
092: * All the child logger of the logger inherit the same level.
093: * The logging of the output is set back to the that of the root logger's file.
094: *
095: * @param componentName the name of the component
096: * eg: portal, search, pas, gateway, rwproxy, nlproxy
097: * @param componentID the ID of the component
098: * portal - Portal ID
099: * search - Search Server ID
100: * pas - not applicable
101: * gateway,rwproxy,nlproxy - Host name
102: * @param instance the name of the instance
103: * portal - Instance ID
104: * search - not applicable
105: * pas - not applicable
106: * gateway,rwproxy,nlproxy - profile ID
107: * @param loggerName the name of the logger.
108: */
109:
110: public void reset(String componentName, String componentID,
111: String instance, String loggerName) throws Exception;
112:
113: /**
114: * Returns Hashtable containing the details of the logger settings
115: *
116: * @param componentName the name of the component
117: * eg: portal, search, pas, gateway, rwproxy, nlproxy
118: * @param componentID the ID of the component
119: * portal - Portal ID
120: * search - Search Server ID
121: * pas - not applicable
122: * gateway,rwproxy,nlproxy - Host name
123: * @param instance the name of the instance
124: * portal - Instance ID
125: * search - not applicable
126: * pas - not applicable
127: * gateway,rwproxy,nlproxy - profile ID
128: * @return Hashtable containing the details of the logger settings
129: * @throws Exception
130: */
131: public Hashtable getCommonLogDetails(String componentName,
132: String componentID, String instance) throws Exception;
133:
134: /**
135: * Sets the details of the logger settings
136: *
137: * @param componentName the name of the component
138: * eg: portal, search, pas, gateway, rwproxy, nlproxy
139: * @param componentID the ID of the component
140: * portal - Portal ID
141: * search - Search Server ID
142: * pas - not applicable
143: * gateway,rwproxy,nlproxy - Host name
144: * @param instance the name of the instance
145: * portal - Instance ID
146: * search - not applicable
147: * pas - not applicable
148: * gateway,rwproxy,nlproxy - profile ID
149: * @param values contains the details of the logger settings
150: * @throws Exception
151: */
152: public void setCommonLogDetails(String componentName,
153: String componentID, String instance, Hashtable values)
154: throws Exception;
155:
156: /**
157: * Returns a list of Hashtable containing the details of the logger.
158: * For each logger there is hashtable.
159: *
160: * @param componentName the name of the component
161: * eg: portal, search, pas, gateway, rwproxy, nlproxy
162: * @param componentID the ID of the component
163: * portal - Portal ID
164: * search - Search Server ID
165: * pas - not applicable
166: * gateway,rwproxy,nlproxy - Host name
167: * @param instance the name of the instance
168: * portal - Instance ID
169: * search - not applicable
170: * pas - not applicable
171: * gateway,rwproxy,nlproxy - profile ID
172: * @return List of Hashtable containing the details of the logger.
173: * @throws Exception
174: */
175: public List getSpecificLogDetails(String componentName,
176: String componentID, String instance) throws Exception;
177:
178: /**
179: * Sets the details of the logger
180: *
181: * @param componentName the name of the component
182: * eg: portal, search, pas, gateway, rwproxy, nlproxy
183: * @param componentID the ID of the component
184: * portal - Portal ID
185: * search - Search Server ID
186: * pas - not applicable
187: * gateway,rwproxy,nlproxy - Host name
188: * @param instance the name of the instance
189: * portal - Instance ID
190: * search - not applicable
191: * pas - not applicable
192: * gateway,rwproxy,nlproxy - profile ID
193: * @param loggersDetails contains the details of the loggers
194: * @throws Exception
195: */
196: public void setSpecificLogDetails(String componentName,
197: String componentID, String instance, List loggersDetails)
198: throws Exception;
199:
200: /**
201: * Returns the list of logger names that have separate files
202: *
203: * @param componentName the name of the component
204: * eg: portal, search, pas, gateway, rwproxy, nlproxy
205: * @param componentID the ID of the component
206: * portal - Portal ID
207: * search - Search Server ID
208: * pas - not applicable
209: * gateway,rwproxy,nlproxy - Host name
210: * @param instance the name of the instance
211: * portal - Instance ID
212: * search - not applicable
213: * pas - not applicable
214: * gateway,rwproxy,nlproxy - profile ID
215: * @return Hashtable containing the list of logger names that have separate files and the level for the logger
216: * @throws Exception
217: */
218: public Hashtable getLogFileNames(String componentName,
219: String componentID, String instance) throws Exception;
220:
221: /**
222: * Returns a list of log records read from the log files.
223: * Each element in the list is a Vector. Each element in the Vector
224: * is a specific data like timestamp, message, name-value pair.
225: *
226: * @param componentName the name of the component
227: * eg: portal, search, pas, gateway, rwproxy, nlproxy
228: * @param componentID the ID of the component
229: * portal - Portal ID
230: * search - Search Server ID
231: * pas - not applicable
232: * gateway,rwproxy,nlproxy - Host name
233: * @param instance the name of the instance
234: * portal - Instance ID
235: * search - not applicable
236: * pas - not applicable
237: * gateway,rwproxy,nlproxy - profile ID
238: * @param logViewerInputs contains the input parameters from the page
239: * @return Hashtable containing list of log records read from the log files and the logfile directory for the logger
240: * @throws Exception
241: */
242: public Hashtable getLogRecords(String componentName,
243: String componentID, String instance,
244: Hashtable logViewerInputs) throws Exception;
245:
246: /**
247: * Gets the details of a logger
248: * @param componentType the name of the componentType
249: * @param componentID the ID of the componentType
250: * @param instance the name of the instance
251: * @param loggerName the name of the logger
252: * @return
253: * @throws Exception
254: */
255: public Hashtable getLoggerDetails(String componentType,
256: String componentID, String instance, String loggerName)
257: throws Exception;
258: }
|