Marks a {@link ShareRequest} as successfully processed.

@param id the id of the {@link ShareRequest}.
@return true if successful; false otherwise.
330521
public synchronized boolean markSuccessful(int id) {
        boolean isSuccessful = false;

        SQLiteDatabase db = null;
        try {
            db = getWritableDatabase();

            // Set state to processed.
            ContentValues values = new ContentValues();
            values.put(ShareRequestTable.COLUMN_STATE, ShareRequest.STATE_PROCESSED);

            isSuccessful = db.update(ShareRequestTable.NAME, values, WHERE_CLAUSE_BY_ID,
                    new String[]{String.valueOf(id)}) > 0;

            sLogger.log(WingsDbHelper.class, "markSuccessful", "isSuccessful=" + isSuccessful + " id=" + id);
        } catch (SQLException e) {
            // Do nothing.
        } finally {
            db.close();
        }
        return isSuccessful;
    }
1041473
public void requestDelete(final String id) throws SDKException {
    CloseableHttpResponse response = null;
    HttpDelete httpDelete = null;
    checkToken();

    try {
      log.debug("pathUrl: " + pathUrl);
      log.debug("id: " + pathUrl + "/" + id);

      // call the api here
      log.info("Executing delete on: " + this.pathUrl + "/" + id);
      httpDelete = new HttpDelete(this.pathUrl + "/" + id);
      httpDelete.setHeader(new BasicHeader("project-id", projectId));
      if (token != null) {
        httpDelete.setHeader(new BasicHeader("authorization", bearerToken.replaceAll("\"", "")));
      }

      response = httpClient.execute(httpDelete);

      // check response status
      RestUtils.checkStatus(response, HttpURLConnection.HTTP_NO_CONTENT);
      httpDelete.releaseConnection();
      // return the response of the request

    } catch (IOException e) {
      // catch request exceptions here
      log.error(e.getMessage(), e);
      if (httpDelete != null) {
        httpDelete.releaseConnection();
      }
      throw new SDKException("Could not http-delete", e.getStackTrace(), e.getMessage());
    } catch (SDKException e) {
      if (response != null
          && (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED)) {
        token = null;
        if (httpDelete != null) {
          httpDelete.releaseConnection();
        }
        requestDelete(id);
        return;
      }
      throw new SDKException(
          "Could not http-delete or the api response was wrong", e.getStackTrace(), e.getMessage());
    } finally {
      if (httpDelete != null) {
        httpDelete.releaseConnection();
      }
    }
  }
7990
public String requestPost(final String id) throws SDKException {
    CloseableHttpResponse response = null;
    HttpPost httpPost = null;
    checkToken();

    try {
      log.debug("pathUrl: " + pathUrl);
      log.debug("id: " + pathUrl + "/" + id);

      // call the api here
      log.debug("Executing post on: " + this.pathUrl + "/" + id);
      httpPost = new HttpPost(this.pathUrl + "/" + id);
      preparePostHeader(httpPost, "application/json", "application/json");

      response = httpClient.execute(httpPost);

      // check response status
      RestUtils.checkStatus(response, HttpURLConnection.HTTP_CREATED);
      // return the response of the request
      String result = "";
      if (response.getEntity() != null) {
        result = EntityUtils.toString(response.getEntity());
      }
      closeResponseObject(response);
      log.trace("received: " + result);

      httpPost.releaseConnection();
      return result;
    } catch (IOException e) {
      // catch request exceptions here
      log.error(e.getMessage(), e);
      if (httpPost != null) {
        httpPost.releaseConnection();
      }
      throw new SDKException(
          "Could not http-post or open the object properly",
          e.getStackTrace(),
          "Could not http-post or open the object properly because: " + e.getMessage());
    } catch (SDKException e) {
      if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
        token = null;
        if (httpPost != null) {
          httpPost.releaseConnection();
        }
        return requestPost(id);
      } else {
        if (httpPost != null) {
          httpPost.releaseConnection();
        }
        try {
          throw new SDKException(
              "Status is " + response.getStatusLine().getStatusCode(),
              new StackTraceElement[0],
              EntityUtils.toString(response.getEntity()));
        } catch (IOException e1) {
          e1.printStackTrace();
          throw new SDKException(
              "Status is " + response.getStatusLine().getStatusCode(),
              new StackTraceElement[0],
              "could not provide reason because: " + e.getMessage());
        }
      }
    }
  }
522124
@Override
    public boolean processSecurityChanges(String id) {
        boolean monitorFound = false;
        for (ServiceReference<FileMonitor> fm : fileMonitors.keySet()) {
            String monitorId = (String) fm.getProperty(com.ibm.ws.kernel.filemonitor.FileMonitor.MONITOR_IDENTIFICATION_NAME);
            String monitorConfigId = (String) fm.getProperty(com.ibm.ws.kernel.filemonitor.FileMonitor.MONITOR_KEYSTORE_CONFIG_ID);

            if (monitorId != null && monitorId.equals(com.ibm.ws.kernel.filemonitor.FileMonitor.SECURITY_MONITOR_IDENTIFICATION_VALUE)) {
                if (id == null) {
                    fileMonitors.get(fm).processFileRefresh(false, null);
                } else if (monitorConfigId != null && monitorConfigId.equalsIgnoreCase(id)) {
                    monitorFound = true;
                    fileMonitors.get(fm).processFileRefresh(false, null);//Find the provided id specific keyStore monitor and refresh
                }
            }
        }
        return monitorFound;
    }
357402
public final boolean isStatefulSessionBean(BeanId id) {
        boolean result = id.getHome().isStatefulSessionHome();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "isStatefulSessionBean : " + result + ", " + id);
        return result;
    }
287578
private boolean isBucketProcessed(int bucketId) {
        synchronized (actualProcessingBuckets) {
            for (Bucket<Data> oneBucket : this.actualProcessingBuckets) {
                if (oneBucket.getBucketId() == bucketId) {
                    return true;
                }
            }
        }
        return false;
    }
1121723
private boolean containsElmentWithId(Node node, String id) {
        String nodeName = node.getNodeName();
        if ("channel".equals(nodeName) || "folder".equals(nodeName)) {
            Element e = (Element) node;
            if (id.equals(e.getAttribute("ID"))) {
                return true;
            }
            if ("folder".equals(nodeName)) {
                for (Node child = e.getFirstChild();
                        child != null;
                        child = child.getNextSibling()) {
                    if (containsElmentWithId(child, id)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
732708
@Override
	public void handleRequest(final Request request) {
		// Clear pressed
		clearPressed();

		String requestValue = request.getParameter(getId());
		boolean pressed = "x".equals(requestValue);

		// Only process on a POST
		if (pressed && !"POST".equals(request.getMethod())) {
			LOG.warn("Button pressed on a request that is not a POST. Will be ignored.");
			return;
		}

		setPressed(pressed, request);
	}
78904
public synchronized boolean complete(Response result) {
        if (completed) {
            return false;
        }
        completed = true;
        this.result = result;
        notifyAll();
        return true;
    }
1165574
public boolean isAsyncStarted(ServletRequest request) {

        if (isAsyncStartedMethod != null) {
            try {
                return (Boolean) isAsyncStartedMethod.invoke(request);
            } catch (IllegalAccessException e) {
                ServletLogger.LOG.error(e);
                return false;
            } catch (InvocationTargetException e) {
                ServletLogger.LOG.error(e);
                return false;
            }
        } else {
            return false;
        }
    }
699280
@Override
  public boolean execute(HttpRequestBase request) {
    DataSenderThread senderThread = new DataSenderThread(HTTP_CLIENT_INSTANCE, request);
    senderThread.run();
    return true;
  }
1250929
private boolean checkID(long id) {
    // Ensure that the given ID is a monotonically increasing ID.
    // If the ID is less than the last received ID then reset the
    // last received ID since the connection must have been reset.
    if (lastReceived == 0 || id == lastReceived + 1 || id < lastReceived) {
      lastReceived = id;
      // If the ID reaches the end of the current batch then tell the data
      // source that it's okay to remove all previous messages.
      if (lastReceived % BATCH_SIZE == 0) {
        ack();
      }
      return true;
    } else {
      fail();
    }
    return false;
  }
697598
public synchronized boolean containsId(int requestId)
   {		
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "containsId", ""+requestId);
	
      testReqIdTableEntry.requestId = requestId;
		boolean result = table.containsKey(testReqIdTableEntry);
		
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "containsId", ""+result);
      return result;
   }
67672
@Override
    public boolean shouldPull(int share, Object id) {
        final String methodName = "shouldPull()";
        boolean shouldPull = false;
        if (this.featureSupport.isReplicationSupported()) {
            // TODO write code to support shouldPull function
            //if (tc.isDebugEnabled()) {
            //    Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it is not implemented yet");
            //}
        } else {
            //Tr.error(tc, "DYNA1065E", new Object[] { methodName, cacheName, this.cacheProviderName});
        }
        return shouldPull;
    }
724382
private boolean isFirstRequestProcessed()
    {
        FacesContext context = FacesContext.getCurrentInstance();
        
        //if firstRequestProcessed is not set, check the application map
        if(!_firstRequestProcessed && context != null 
                && Boolean.TRUE.equals(context.getExternalContext().getApplicationMap()
                        .containsKey(LifecycleImpl.FIRST_REQUEST_PROCESSED_PARAM)))
        {
            _firstRequestProcessed = true;
        }
        return _firstRequestProcessed;
    }
987085
@Override
    public boolean isIPC () {
        String shr = this.getShare();
        if ( shr == null || "IPC$".equals(getShare()) ) {
            if ( log.isDebugEnabled() ) {
                log.debug("Share is IPC " + this.share);
            }
            return true;
        }
        return false;
    }
1131255
public boolean hasPermissionsById(String id, String... permissions) {
        List<Permission> resolvedPermissions = Lists.newArrayListWithCapacity(permissions.length);
        for (String permission : permissions) {
            resolvedPermissions.add(getPermissionResolver().resolvePermission(permission));
        }
        return hasPermissionsById(id, resolvedPermissions);
    }