001: /**
002: * Copyright 2005 Sun Microsystems, Inc. All
003: * rights reserved. Use of this product is subject
004: * to license terms. Federal Acquisitions:
005: * Commercial Software -- Government Users
006: * Subject to Standard License Terms and
007: * Conditions.
008: *
009: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
010: * are trademarks or registered trademarks of Sun Microsystems,
011: * Inc. in the United States and other countries.
012: */package com.sun.portal.admin.console.search;
013:
014: import java.util.*;
015:
016: import com.sun.portal.admin.console.common.PSBaseBean;
017:
018: public class RobotFilterBean extends PSBaseBean {
019:
020: public String id = "";
021: public String ruleName = "";
022: public String numOfSite = "0";
023: public String usedInSites = "";
024: public String newSiteDefault = "";
025: public String status = "";
026: public boolean checked = false;
027:
028: private Boolean state = Boolean.TRUE;
029:
030: public RobotFilterBean() {
031: checked = false;
032: }
033:
034: public RobotFilterBean(String id, HashMap fr) {
035: this .id = id;
036: checked = false;
037: ruleName = (String) fr.get("FilterName");
038: if (ruleName.startsWith("filter.default")) {
039: ruleName = getLocalizedString((String) fr.get("FilterName"));
040: }
041: if (((Boolean) fr.get("State")).booleanValue()) {
042: status = getLocalizedString("search.general.enabled");
043: } else {
044: status = getLocalizedString("search.general.disabled");
045: }
046:
047: if (((Boolean) fr.get("NewSite")).booleanValue()) {
048: newSiteDefault = getLocalizedString("search.general.yes");
049: } else {
050: newSiteDefault = getLocalizedString("search.general.no");
051: }
052:
053: numOfSite = (String) fr.get("DeploymentNum");
054: usedInSites = (String) fr.get("Deployment");
055: }
056:
057: public String getId() {
058: return id;
059: }
060:
061: public void setId(String id) {
062: this .id = id;
063: }
064:
065: public String getRuleName() {
066: return ruleName;
067: }
068:
069: public void setRuleName(String name) {
070: this .ruleName = name;
071: }
072:
073: public String getNumOfSite() {
074: return numOfSite;
075: }
076:
077: public void setNumOfSite(String s) {
078: this .numOfSite = s;
079: }
080:
081: public String getUsedInSites() {
082: return usedInSites;
083: }
084:
085: public void setUsedInSites(String s) {
086: this .usedInSites = s;
087: }
088:
089: public String getNewSiteDefault() {
090: return newSiteDefault;
091: }
092:
093: public void setNewSiteDefault(String s) {
094: this .newSiteDefault = s;
095: }
096:
097: public String getStatus() {
098: return status;
099: }
100:
101: public void setStatus(String status) {
102: this .status = status;
103: }
104:
105: public boolean getChecked() {
106: return checked;
107: }
108:
109: public void setChecked(boolean checked) {
110: this .checked = checked;
111: }
112:
113: /*
114: * Private Methods
115: */
116: private String getLocalizedString(String key) {
117: return super .getLocalizedString("search", key);
118: }
119:
120: }
|