|
|
@ -41,6 +41,8 @@ public class HistoryTemplateListCache implements CallbackEvent { |
|
|
|
private List<JTemplate<?, ?>> historyList; |
|
|
|
private List<JTemplate<?, ?>> historyList; |
|
|
|
private JTemplate<?, ?> editingTemplate; |
|
|
|
private JTemplate<?, ?> editingTemplate; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JTemplate<?, ?> openingOrEditingTemplate; |
|
|
|
|
|
|
|
|
|
|
|
public static HistoryTemplateListCache getInstance() { |
|
|
|
public static HistoryTemplateListCache getInstance() { |
|
|
|
return Holder.INSTANCE; |
|
|
|
return Holder.INSTANCE; |
|
|
|
} |
|
|
|
} |
|
|
@ -98,8 +100,15 @@ public class HistoryTemplateListCache implements CallbackEvent { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setCurrentOpeningTemplate(JTemplate<?, ?> jt) { |
|
|
|
|
|
|
|
this.openingOrEditingTemplate = jt; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JTemplate<?, ?> getCurrentOpeningOrEditingTemplate() { |
|
|
|
|
|
|
|
return openingOrEditingTemplate; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 需要使用 {@link JTemplate#isValid(JTemplate)} 来判断空 |
|
|
|
* 需要使用 {@link JTemplate#isValid(JTemplate)} 来判断空 |
|
|
|
* |
|
|
|
* |
|
|
@ -116,6 +125,7 @@ public class HistoryTemplateListCache implements CallbackEvent { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setCurrentEditingTemplate(JTemplate<?, ?> jt) { |
|
|
|
public void setCurrentEditingTemplate(JTemplate<?, ?> jt) { |
|
|
|
this.editingTemplate = jt; |
|
|
|
this.editingTemplate = jt; |
|
|
|
|
|
|
|
this.openingOrEditingTemplate = jt; |
|
|
|
|
|
|
|
|
|
|
|
if (!JTemplate.isValid(jt)) { |
|
|
|
if (!JTemplate.isValid(jt)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|