001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/search/tags/sakai_2-4-1/search-tool/tool/src/java/org/sakaiproject/search/tool/api/SearchAdminBean.java $
003: * $Id: SearchAdminBean.java 22723 2007-03-16 01:35:32Z ian@caret.cam.ac.uk $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.search.tool.api;
021:
022: import java.util.List;
023:
024: import org.sakaiproject.exception.PermissionException;
025: import org.sakaiproject.search.api.SearchStatus;
026: import org.sakaiproject.search.tool.model.AdminOption;
027: import org.sakaiproject.search.tool.model.MasterRecord;
028: import org.sakaiproject.search.tool.model.Segment;
029: import org.sakaiproject.search.tool.model.WorkerThread;
030:
031: /**
032: * A backing bean for the search admin page. The implementation of this bean
033: * should enfoce any authz that is required.
034: *
035: * @author ieb
036: */
037: public interface SearchAdminBean {
038:
039: /**
040: * Get the Title of the index
041: *
042: * @return
043: */
044: String getTitle();
045:
046: /**
047: * get an HTML fragment representing the status of the index
048: *
049: * @param statusFormatString
050: * {0} is the Last Load time {1} is how long it took to load {2} is
051: * the current worker node (none if none) {3} is the Latest time of
052: * completion of the worker
053: * @return
054: * @throws PermissionException
055: * if the user does not have permissions to perform the action
056: * @deprecated
057: */
058: String getIndexStatus(String statusFormatString)
059: throws PermissionException;
060:
061: /**
062: * @param rowFormat
063: * {0} is the worker name {1} is the latest time the node should
064: * reaapear, after which time the node will be considered overdue and
065: * removed from the list of worker nodes.
066: * @return
067: * @deprecated
068: */
069: String getWorkers(String rowFormat);
070:
071: /**
072: * Get admin options formatted according to pattern
073: *
074: * @param adminOptionsFormat
075: * format pattern {0} is the URL, {1} is the text
076: * @return
077: * @deprecated
078: */
079: String getAdminOptions(String adminOptionsFormat);
080:
081: /**
082: * get a BIG list of all documents in the index
083: *
084: * @param rowFormat
085: * @return
086: * @deprecated
087: */
088: String getIndexDocuments(String rowFormat);
089:
090: /**
091: * get a list of Global Master documents
092: *
093: * @param rowFormat
094: * @return
095: * @deprecated
096: */
097: String getGlobalMasterDocuments(String rowFormat);
098:
099: /**
100: * get a list of Site Master Documents
101: *
102: * @param rowFormat
103: * @return
104: * @deprecated
105: */
106: String getSiteMasterDocuments(String rowFormat);
107:
108: /**
109: * get feedback from the command
110: * @return
111: */
112: String getCommandFeedback();
113:
114: /**
115: *
116: * @param rowFormat
117: * @return
118: * @deprecated
119: */
120: String getSegmentInfo(String rowFormat);
121:
122: /**
123: * get a list of options for the admin user
124: * @return
125: */
126: List<AdminOption> getOptons();
127:
128: /**
129: * get the search status
130: * @return
131: */
132: SearchStatus getSearchStatus();
133:
134: /**
135: * get a list of master objects
136: * @return
137: */
138: List<MasterRecord> getGlobalMasterRecords();
139:
140: /**
141: * get a list of site master records
142: * @return
143: */
144: List<MasterRecord> getSiteMasterRecords();
145:
146: /**
147: * get a list of segments
148: * @return
149: */
150: List<Segment> getSegments();
151:
152: /**
153: * get a list of worker threads
154: * @return
155: */
156: List<WorkerThread> getWorkerThreads();
157:
158: }
|