Show RobotsCommand.java syntax highlighted
/*
* Created on 16/06/2004
*
*/
package com.kneobase.web.robots;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Vector;
import com.kneobase.logging.LogIndexSessionDecorator;
/**
* @author gustavo
*
*/
public class RobotsCommand {
String deleteAll = "";
String execute = "";
String stop = "";
String update = "";
String refresh = "";
String showLog = "";
String source = "";
String open = "";
String close = "";
String displayRobotName;
Collection robotBeans;
boolean indexing = false;
LogIndexSessionDecorator indexSession;
/**
* @return
*/
public String getExecute() {
return execute;
}
/**
* @param string
*/
public void setExecute(String string) {
execute = string;
}
/**
* @return
*/
public String getShowLog() {
return showLog;
}
/**
* @param string
*/
public void setShowLog(String string) {
showLog = string;
}
/**
* @return
*/
public String getSource() {
return source;
}
/**
* @param string
*/
public void setSource(String string) {
source = string;
}
/**
* @return
*/
public boolean isIndexing() {
return indexing;
}
/**
* @param b
*/
public void setIndexing(boolean b) {
indexing = b;
}
/**
* @return
*/
public LogIndexSessionDecorator getIndexSession() {
return indexSession;
}
/**
* @param decorator
*/
public void setIndexSession(LogIndexSessionDecorator decorator) {
indexSession = decorator;
}
/**
* @return
*/
public String getDisplayRobotName() {
return displayRobotName;
}
/**
* @param string
*/
public void setDisplayRobotName(String string) {
displayRobotName = string;
}
/**
* @return
*/
public Collection getRobotBeans() {
return robotBeans;
}
/**
* @param collection
*/
public void setRobotBeans(Collection collection) {
Comparator comparator = new Comparator() {
public boolean equals(Object arg0) {
return false;
}
public int compare(Object arg0, Object arg1) {
RobotIndexBean bean0 = (RobotIndexBean) arg0;
RobotIndexBean bean1 = (RobotIndexBean) arg1;
if (bean0.isWorking() && !bean1.isWorking())
return -1;
else if (!bean0.isWorking() && bean1.isWorking())
return 1;
else {
return bean0.getRobotName().toLowerCase().compareTo(bean1.getRobotName().toLowerCase());
}
}
};
List aux = new Vector(collection);
Collections.sort(aux, comparator);
robotBeans = aux;
}
/**
* @return
*/
public String getStop() {
return stop;
}
/**
* @param string
*/
public void setStop(String string) {
stop = string;
}
/**
* @return
*/
public String getUpdate() {
return update;
}
/**
* @param string
*/
public void setUpdate(String string) {
update = string;
}
/**
* @return
*/
public String getRefresh() {
return refresh;
}
/**
* @param string
*/
public void setRefresh(String string) {
refresh = string;
}
/**
* @return
*/
public String getDeleteAll() {
return deleteAll;
}
/**
* @param string
*/
public void setDeleteAll(String string) {
deleteAll = string;
}
/**
* @return
*/
public String getClose() {
return close;
}
/**
* @return
*/
public String getOpen() {
return open;
}
/**
* @param string
*/
public void setClose(String string) {
close = string;
}
/**
* @param string
*/
public void setOpen(String string) {
open = string;
}
}
See more files for this project here