public void setGeneric(Boolean generic) { if (generic != null) { this.generic = generic.toString(); } }
public void setGeneric(Boolean generic) { if (generic != null) { this.generic = generic.toString(); } }
/** * Programmatically set a local flag to "true", overriding an * entry in the {@code spring.properties} file (if any). * @param key the property key */ public static void setFlag(String key) { localProperties.put(key, Boolean.TRUE.toString()); }
/** * Set the (new) value of the {@code Access-Control-Allow-Credentials} response header. */ public void setAccessControlAllowCredentials(boolean allowCredentials) { set(ACCESS_CONTROL_ALLOW_CREDENTIALS, Boolean.toString(allowCredentials)); }
@Override public Preferences putBoolean (String key, boolean val) { properties.put(key, Boolean.toString(val)); return this; }
@Override public Preferences putBoolean (String key, boolean val) { properties.put(key, Boolean.toString(val)); return this; }
@Override public Object operate(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException { if (operation==Operation.ADD) { return ((String)leftOperand)+((Boolean)rightOperand).toString(); } else { return leftOperand; } }
public void arrayz(boolean... bs) { s = ""; if (bs != null) { s = ""; for (boolean b: bs) { s += Boolean.toString(b); } } }
public String getString() { return Boolean.toString(this.initialized); } }
public static boolean isReturnTypeFuture(Invocation inv) { return Boolean.TRUE.toString().equals(inv.getAttachment(Constants.FUTURE_RETURNTYPE_KEY)); }
public static boolean isReturnTypeFuture(Invocation inv) { return Boolean.TRUE.toString().equals(inv.getAttachment(Constants.FUTURE_RETURNTYPE_KEY)); }
public static Runnable buildManagedTask(Runnable task, String identityName) { Map<String, String> properties; if (task instanceof SchedulingAwareRunnable) { properties = new HashMap<>(4); properties.put(ManagedTask.LONGRUNNING_HINT, Boolean.toString(((SchedulingAwareRunnable) task).isLongLived())); } else { properties = new HashMap<>(2); } properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
private static boolean isAttachInvocationId(URL url, Invocation invocation) { String value = url.getMethodParameter(invocation.getMethodName(), Constants.AUTO_ATTACH_INVOCATIONID_KEY); if (value == null) { // add invocationid in async operation by default return isAsync(url, invocation); } else if (Boolean.TRUE.toString().equalsIgnoreCase(value)) { return true; } else { return false; } }
public static boolean isAsync(URL url, Invocation inv) { boolean isAsync; if (Boolean.TRUE.toString().equals(inv.getAttachment(Constants.ASYNC_KEY))) { isAsync = true; } else { isAsync = url.getMethodParameter(getMethodName(inv), Constants.ASYNC_KEY, false); } return isAsync; }
public static boolean isOneway(URL url, Invocation inv) { boolean isOneway; if (Boolean.FALSE.toString().equals(inv.getAttachment(Constants.RETURN_KEY))) { isOneway = true; } else { isOneway = !url.getMethodParameter(getMethodName(inv), Constants.RETURN_KEY, true); } return isOneway; }
public static boolean isOneway(URL url, Invocation inv) { boolean isOneway; if (Boolean.FALSE.toString().equals(inv.getAttachment(Constants.RETURN_KEY))) { isOneway = true; } else { isOneway = !url.getMethodParameter(getMethodName(inv), Constants.RETURN_KEY, true); } return isOneway; }
public static boolean isAsync(URL url, Invocation inv) { boolean isAsync; if (Boolean.TRUE.toString().equals(inv.getAttachment(Constants.ASYNC_KEY))) { isAsync = true; } else { isAsync = url.getMethodParameter(getMethodName(inv), Constants.ASYNC_KEY, false); } return isAsync; }
private static boolean isAttachInvocationId(URL url, Invocation invocation) { String value = url.getMethodParameter(invocation.getMethodName(), Constants.AUTO_ATTACH_INVOCATIONID_KEY); if (value == null) { // add invocationid in async operation by default return isAsync(url, invocation); } else if (Boolean.TRUE.toString().equalsIgnoreCase(value)) { return true; } else { return false; } }
public LazyConnectExchangeClient(URL url, ExchangeHandler requestHandler) { // lazy connect, need set send.reconnect = true, to avoid channel bad status. this.url = url.addParameter(Constants.SEND_RECONNECT_KEY, Boolean.TRUE.toString()); this.requestHandler = requestHandler; this.initialState = url.getParameter(Constants.LAZY_CONNECT_INITIAL_STATE_KEY, Constants.DEFAULT_LAZY_CONNECT_INITIAL_STATE); this.requestWithWarning = url.getParameter(REQUEST_WITH_WARNING_KEY, false); }
public LazyConnectExchangeClient(URL url, ExchangeHandler requestHandler) { // lazy connect, need set send.reconnect = true, to avoid channel bad status. this.url = url.addParameter(Constants.SEND_RECONNECT_KEY, Boolean.TRUE.toString()); this.requestHandler = requestHandler; this.initialState = url.getParameter(Constants.LAZY_CONNECT_INITIAL_STATE_KEY, Constants.DEFAULT_LAZY_CONNECT_INITIAL_STATE); this.requestWithWarning = url.getParameter(REQUEST_WITH_WARNING_KEY, false); }