Skip to content

Commit

Permalink
remove methods like synchronizesVariablesWithBindings where not neces…
Browse files Browse the repository at this point in the history
…sary
  • Loading branch information
darkv committed Jan 18, 2013
1 parent eeef393 commit 46baf84
Show file tree
Hide file tree
Showing 40 changed files with 13 additions and 230 deletions.
Expand Up @@ -5,31 +5,13 @@
import com.webobjects.appserver.WOContext;
import com.webobjects.foundation.NSMutableArray;

import er.extensions.components.ERXComponent;
import er.extensions.components.ERXStatelessComponent;

public class PageWrapper extends ERXComponent {
public class PageWrapper extends ERXStatelessComponent {
public PageWrapper(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
// makes this component non-synchronizing
return false;
}

@Override
public boolean isStateless() {
// makes this component stateless
return true;
}

@Override
public void reset() {
// resets ivars at the end or RR phases
super.reset();
}

public boolean hasErrors() {
return Utilities.hasErrors();
}
Expand All @@ -51,4 +33,4 @@ public String errorString() {
}
return b.toString();
}
}
}
Expand Up @@ -3,10 +3,10 @@
import org.apache.log4j.Logger;

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WOComponent;
import com.webobjects.appserver.WOContext;
import com.webobjects.foundation.NSArray;

import er.extensions.components.ERXStatelessComponent;
import er.extensions.concurrency.ERXFutureTask;
import er.extensions.concurrency.ERXTaskInfo;
import er.extensions.concurrency.ERXTaskThread;
Expand All @@ -19,7 +19,7 @@
*
* @author kieran
*/
public class TaskThreadMonitor extends WOComponent {
public class TaskThreadMonitor extends ERXStatelessComponent {

@SuppressWarnings("unused")
private static final Logger log = Logger.getLogger(TaskThreadMonitor.class);
Expand Down Expand Up @@ -75,18 +75,6 @@ public String taskDescription() {
return loopTaskItem().task().toString();
}

@Override
public boolean synchronizesVariablesWithBindings() {
// makes this component non-synchronizing
return false;
}

@Override
public boolean isStateless() {
// makes this component stateless
return true;
}

@Override
public void reset() {
super.reset();
Expand Down
Expand Up @@ -2,30 +2,10 @@

import com.webobjects.appserver.WOContext;

import er.extensions.components.ERXComponent;
import er.extensions.components.ERXStatelessComponent;

public class PageWrapper extends ERXComponent {
public class PageWrapper extends ERXStatelessComponent {
public PageWrapper(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
// makes this component non-synchronizing
return false;
}

@Override
public boolean isStateless() {
// makes this component stateless
return true;
}

@Override
public void reset() {
// resets ivars at the end or RR phases
super.reset();
}


}
}
Expand Up @@ -32,11 +32,6 @@ public static interface Bindings extends jQueryGet.Bindings {
public static final String confirmMessage = "confirmMessage";
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down Expand Up @@ -92,4 +87,4 @@ public WOActionResults invokeAction() {
return action;
} else return context().page();
}
}
}
Expand Up @@ -30,11 +30,6 @@ public static interface Bindings extends jQueryLoad.Bindings {
public static final String queryDictionary = "queryDictionary";
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down Expand Up @@ -70,4 +65,4 @@ public WOActionResults invokeAction() {
return action;
} else return context().page();
}
}
}
Expand Up @@ -28,11 +28,6 @@ public AjaxRequestButton(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down
Expand Up @@ -24,11 +24,6 @@ public AjaxRequestLink(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down Expand Up @@ -83,4 +78,4 @@ public WOActionResults invokeAction() {
return action;
} else return context().page();
}
}
}
Expand Up @@ -27,11 +27,6 @@ public AjaxUpdaterButton(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down
Expand Up @@ -24,11 +24,6 @@ public AjaxUpdaterLink(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down
Expand Up @@ -76,10 +76,6 @@ public CalendarDateSelect(WOContext context) {
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

public boolean isStateless() {
return true;
}
Expand Down
Expand Up @@ -22,10 +22,6 @@ public LightWindowButton(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
Expand Down
Expand Up @@ -27,11 +27,6 @@ public static interface Bindings extends LightWindow.Bindings {
public static final String pageName = "pageName";
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down
Expand Up @@ -32,11 +32,6 @@ public ModalBoxButton(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public boolean isStateless() {
return true;
Expand Down
Expand Up @@ -17,10 +17,6 @@ public boolean isStateless() {
return true;
}

public boolean synchronizesVariablesWithBindings() {
return false;
}

@Override
public WOActionResults handleRequest(WORequest request, WOContext context) {
return null;
Expand Down
Expand Up @@ -63,13 +63,6 @@ public boolean isStateless() {
return true;
}

/**
* Overridden because the component does not synch with the bindings.
*/
public boolean synchronizesVariablesWithBindings() {
return false;
}

public String indicator() {
String indicator = (String)valueForBinding("indicator");
if (indicator == null && valueForBinding("indicatorFilename") != null) {
Expand Down Expand Up @@ -228,10 +221,6 @@ public void setStringValue(String strValue) {
setValueForBinding(strValue, "value");
}

public void takeValuesFromRequest(WORequest request, WOContext context) {
super.takeValuesFromRequest(request, context);
}

protected void appendItemToResponse(Object value, WOElement child, boolean hasItem, WOResponse response, WOContext context) {
response.appendContentString("<li>");
if(hasItem && child != null) {
Expand Down
Expand Up @@ -84,10 +84,6 @@ public boolean isStateless() {
return Boolean.TRUE;
}

public boolean synchronizesVariablesWithBindings() {
return Boolean.FALSE;
}

@SuppressWarnings("rawtypes")
public static Object draggableObjectForPage(WOComponent page, String draggableID) {
Object droppedObject = null;
Expand Down
Expand Up @@ -46,16 +46,6 @@ public boolean isStateless() {
return true;
}

/**
* Tells the component not to synchronize its binding values. This means we
* have to do it manually.
*
* @return boolean
*/
public boolean synchronizesVariablesWithBindings() {
return false;
}

/**
* NSArray of binding values presented in the way PayPal expects them. This
* array will be used in the WOComponent (in a WORepetition) to pass values
Expand Down
Expand Up @@ -43,11 +43,6 @@ public PayPalSingleItemHyperlink(WOContext context) {
* @return boolean
*/
public boolean isStateless() { return true; }
/** Tells the component not to synchronize its binding values. This means we have to do it manually.
*
* @return boolean
*/
public boolean synchronizesVariablesWithBindings() { return false; }

/** Assembles the url to send to PayPal for the single item purchase
*
Expand Down
Expand Up @@ -37,10 +37,6 @@ public ERD2WFlyOverCustomComponent(WOContext context) {
super(context);
}

/** component does not synchronize it's variables */
@Override
public boolean synchronizesVariablesWithBindings() { return false; }

@Override
public boolean isStateless() { return true; }

Expand Down
Expand Up @@ -35,9 +35,6 @@ public class ERDEditDatePopupOrNull extends ERDEditDatePopupCommon {
public String empty() { return empty; }
public String date() { return date; }

public boolean isStateless() { return true; }
public boolean synchronizesVariablesWithBindings() { return false; }

public Object timeZoneString() {
return TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT);
}
Expand Down
Expand Up @@ -545,11 +545,6 @@ public boolean synchronizesVariablesWithBindings() {
return false;
}

/** component is not stateless */
public boolean isStateless() {
return false;
}

public void sleep() {
needsAutoSubmit = false;
super.sleep();
Expand Down
Expand Up @@ -42,10 +42,6 @@ public boolean synchronizesVariablesWithBindings() {
return false;
}

public void reset() {
super.reset();
}

public Object displayValue() {
Object value = objectKeyPathValue();
if (value instanceof EOEnterpriseObject) {
Expand Down
Expand Up @@ -25,5 +25,4 @@ public class ERDXMLPageWrapper extends WOComponent {
public ERDXMLPageWrapper(WOContext context) { super(context); }

public boolean isStateless() { return true; }
public boolean synchronizesVariablesWithBindings() { return false; }
}
Expand Up @@ -41,9 +41,4 @@ public String noString() {
public boolean isStateless() {
return true;
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}
}
Expand Up @@ -44,7 +44,6 @@ public static interface DebugPageProvider {
}

public boolean isStateless() { return true; }
public boolean synchronizesVariablesWithBindings() { return false; }

private DebugPageProvider _debugPageProvider;
public DebugPageProvider debugPageProvider() {
Expand Down

0 comments on commit 46baf84

Please sign in to comment.