@@ -71,9 +71,9 @@ public class ProcessorPresenter extends MyPresenterWidget<ProcessorPresenter.Pro
71
71
private ButtonView removeButton ;
72
72
private ButtonView permissionsButton ;
73
73
74
+ private boolean allowCreate ;
74
75
private boolean allowUpdate ;
75
76
private boolean isAdmin ;
76
- private boolean allowEdit ;
77
77
78
78
private ExpressionOperator defaultExpression ;
79
79
@@ -105,10 +105,10 @@ public void read(final DocRef docRef, final Object document, final boolean readO
105
105
this .docRef = docRef ;
106
106
processorListPresenter .read (docRef , document , readOnly );
107
107
if (document instanceof PipelineDoc ) {
108
- allowEdit = true ;
108
+ allowCreate = true ;
109
109
} else if (document instanceof AnalyticRuleDoc ) {
110
110
processorType = ProcessorType .STREAMING_ANALYTIC ;
111
- allowEdit = true ;
111
+ allowCreate = true ;
112
112
}
113
113
}
114
114
@@ -128,7 +128,7 @@ public void setAllowUpdate(final boolean allowUpdate) {
128
128
129
129
private void createButtons () {
130
130
if (removeButton == null ) {
131
- if (allowEdit ) {
131
+ if (allowCreate ) {
132
132
addButton = processorListPresenter .getView ().addButton (SvgPresets .ADD );
133
133
addButton .setTitle ("Add Processor" );
134
134
registerHandler (addButton .addClickHandler (event -> {
@@ -146,7 +146,7 @@ private void createButtons() {
146
146
}
147
147
}));
148
148
149
- if (allowEdit ) {
149
+ if (allowCreate ) {
150
150
duplicateButton = processorListPresenter .getView ().addButton (SvgPresets .COPY );
151
151
duplicateButton .setTitle ("Duplicate Processor" );
152
152
registerHandler (duplicateButton .addClickHandler (event -> {
@@ -252,7 +252,7 @@ public MultiSelectionModel<ProcessorListRow> getSelectionModel() {
252
252
}
253
253
254
254
private void addProcessor () {
255
- if (allowEdit ) {
255
+ if (allowCreate ) {
256
256
edit (null , defaultExpression , null );
257
257
}
258
258
}
@@ -261,7 +261,7 @@ private void addProcessor() {
261
261
* Make a copy of the currently selected processor
262
262
*/
263
263
private void duplicateProcessor () {
264
- if (allowEdit ) {
264
+ if (allowCreate ) {
265
265
// Now create the processor filter using the find stream criteria.
266
266
final ProcessorFilterRow row = (ProcessorFilterRow ) selectedProcessor ;
267
267
final ProcessorFilter processorFilter = row .getProcessorFilter ();
@@ -280,7 +280,7 @@ private void duplicateProcessor() {
280
280
}
281
281
282
282
private void editProcessor () {
283
- if (allowEdit && selectedProcessor != null ) {
283
+ if (selectedProcessor != null ) {
284
284
if (selectedProcessor instanceof ProcessorFilterRow ) {
285
285
final ProcessorFilterRow processorFilterRow = (ProcessorFilterRow ) selectedProcessor ;
286
286
final ProcessorFilter filter = processorFilterRow .getProcessorFilter ();
0 commit comments