001
014
015 package com.liferay.portal.kernel.search.facet.config;
016
017 import com.liferay.portal.kernel.json.JSONFactoryUtil;
018 import com.liferay.portal.kernel.json.JSONObject;
019 import com.liferay.portal.kernel.util.StringPool;
020
021
024 public class FacetConfiguration {
025
026 public String getClassName() {
027 return _className;
028 }
029
030 public JSONObject getData() {
031 if (_dataJSONObject == null) {
032 _dataJSONObject = JSONFactoryUtil.createJSONObject();
033 }
034
035 return _dataJSONObject;
036 }
037
038
041 @Deprecated
042 public String getDisplayStyle() {
043 return StringPool.BLANK;
044 }
045
046 public String getFieldName() {
047 return _fieldName;
048 }
049
050 public String getLabel() {
051 return _label;
052 }
053
054 public String getOrder() {
055 if (_order == null) {
056 return "OrderHitsDesc";
057 }
058
059 return _order;
060 }
061
062 public double getWeight() {
063 return _weight;
064 }
065
066 public boolean isStatic() {
067 return _static;
068 }
069
070 public void setClassName(String className) {
071 _className = className;
072 }
073
074 public void setDataJSONObject(JSONObject dataJSONObject) {
075 _dataJSONObject = dataJSONObject;
076 }
077
078
081 @Deprecated
082 public void setDisplayStyle(String displayStyle) {
083 }
084
085 public void setFieldName(String fieldName) {
086 _fieldName = fieldName;
087 }
088
089 public void setLabel(String label) {
090 _label = label;
091 }
092
093 public void setOrder(String order) {
094 _order = order;
095 }
096
097 public void setStatic(boolean isStatic) {
098 _static = isStatic;
099 }
100
101 public void setWeight(double weight) {
102 _weight = weight;
103 }
104
105 private String _className;
106 private JSONObject _dataJSONObject;
107 private String _fieldName;
108 private String _label;
109 private String _order;
110 private boolean _static;
111 private double _weight;
112
113 }