|
|
|
@ -29,6 +29,7 @@ import java.util.Stack;
|
|
|
|
|
*/ |
|
|
|
|
public class AlphaFineConfigManager implements XMLable { |
|
|
|
|
|
|
|
|
|
public static final String COMMA = ","; |
|
|
|
|
private static final long serialVersionUID = -8170289826729582122L; |
|
|
|
|
private static AlphaFineConfigManager alphaFineConfigManager = new AlphaFineConfigManager(); |
|
|
|
|
/** |
|
|
|
@ -91,27 +92,20 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
* 是否提醒 |
|
|
|
|
*/ |
|
|
|
|
private boolean needRemind = true; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 产品动态 |
|
|
|
|
*/ |
|
|
|
|
private boolean productDynamics = true; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 模板商城是否展示 |
|
|
|
|
* */ |
|
|
|
|
*/ |
|
|
|
|
private boolean showTemplateShop = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* tab页排序 |
|
|
|
|
* 默认排序:动态,模板商城,帮助文档,插件中心,功能,我的模板 |
|
|
|
|
* */ |
|
|
|
|
*/ |
|
|
|
|
private String[] tabOrder; |
|
|
|
|
public static final String COMMA = ","; |
|
|
|
|
|
|
|
|
|
private Map<String, String> actionSearchTextCache = new HashMap<>(8); |
|
|
|
|
|
|
|
|
|
private String cacheBuildNO; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -207,7 +201,7 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
if (ComparatorUtils.equals(reader.getTagName(), "history")) { |
|
|
|
|
String tmpVal = reader.getElementValue(); |
|
|
|
|
if (tmpVal != null) { |
|
|
|
|
tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); |
|
|
|
|
tmpVal = tmpVal.replace("[", StringUtils.EMPTY).replace("]", StringUtils.EMPTY); |
|
|
|
|
Stack<String> stack = new SizedStack<>(3); |
|
|
|
|
String[] historyList = tmpVal.split(","); |
|
|
|
|
for (String history : historyList) { |
|
|
|
@ -231,7 +225,7 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
if (ComparatorUtils.equals(reader.getTagName(), "readId")) { |
|
|
|
|
String tmpVal = reader.getElementValue(); |
|
|
|
|
if (tmpVal != null) { |
|
|
|
|
tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); |
|
|
|
|
tmpVal = tmpVal.replace("[", StringUtils.EMPTY).replace("]", StringUtils.EMPTY); |
|
|
|
|
String[] idArr = tmpVal.split(","); |
|
|
|
|
Set<Long> setId = new HashSet<>(); |
|
|
|
|
for (String id : idArr) { |
|
|
|
@ -329,7 +323,7 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 返回默认排序 |
|
|
|
|
* */ |
|
|
|
|
*/ |
|
|
|
|
private String getDefaultTabOrder() { |
|
|
|
|
return AlphaFineConstants.PRODUCT_NEWS + COMMA + AlphaFineConstants.TEMPLATE_SHOP + COMMA + AlphaFineConstants.HELP + COMMA + AlphaFineConstants.PLUGIN + COMMA + AlphaFineConstants.FUNCTION + COMMA + AlphaFineConstants.MY_TEMPLATES; |
|
|
|
|
} |
|
|
|
@ -350,14 +344,14 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
this.containDocument = containDocument; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setContainMyTemplate(boolean containMyTemplate) { |
|
|
|
|
this.containMyTemplate = containMyTemplate; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean isContainMyTemplate() { |
|
|
|
|
return containMyTemplate; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setContainMyTemplate(boolean containMyTemplate) { |
|
|
|
|
this.containMyTemplate = containMyTemplate; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean isContainTemplate() { |
|
|
|
|
return containTemplate; |
|
|
|
|
} |
|
|
|
@ -478,6 +472,10 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
return productDynamics && FRContext.isChineseEnv(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setProductDynamics(boolean productDynamics) { |
|
|
|
|
this.productDynamics = productDynamics; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean hasTemplateShop() { |
|
|
|
|
return showTemplateShop && FRContext.isChineseEnv(); |
|
|
|
|
} |
|
|
|
@ -486,13 +484,9 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
this.showTemplateShop = showTemplateShop; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setProductDynamics(boolean productDynamics) { |
|
|
|
|
this.productDynamics = productDynamics; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 返回tab显示顺序 |
|
|
|
|
* */ |
|
|
|
|
*/ |
|
|
|
|
public String[] getTabOrder() { |
|
|
|
|
if (tabOrder == null) { |
|
|
|
|
tabOrder = getDefaultTabOrder().split(COMMA); |
|
|
|
@ -500,9 +494,13 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
return tabOrder; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setTabOrder(String[] tabOrder) { |
|
|
|
|
this.tabOrder = tabOrder; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* getTabOrder的tostring |
|
|
|
|
* */ |
|
|
|
|
*/ |
|
|
|
|
public String getTabOrderString() { |
|
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
|
for (String s : getTabOrder()) { |
|
|
|
@ -510,8 +508,4 @@ public class AlphaFineConfigManager implements XMLable {
|
|
|
|
|
} |
|
|
|
|
return sb.toString(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setTabOrder(String[] tabOrder) { |
|
|
|
|
this.tabOrder = tabOrder; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|