Package com.data2semantics.yasgui.server.db

Examples of com.data2semantics.yasgui.server.db.DbHelper


  }

  @Override
  public AutocompletionsInfo getAutocompletionsInfo() throws IllegalArgumentException, FetchException {
    try {
      DbHelper db = new DbHelper(new File(getServletContext().getRealPath("/")), getThreadLocalRequest());
      return db.getAutocompletionInfo();
    } catch (Exception e) {
      throw new FetchException(e.getMessage());
    }
  }
View Full Code Here


  }

  @Override
  public boolean isEndpointAccessible(String endpoint) throws IllegalArgumentException {
    try {
      DbHelper db = new DbHelper(new File(getServletContext().getRealPath("/")), getThreadLocalRequest());
      AccessibilityStatus status = AccessibilityStatus.UNCHECKED;
      try {
        db.isEndpointAccessible(db.getEndpointId(endpoint, EndpointPrivateFlag.OWN_AND_PUBLIC));
      } catch (EndpointIdException e) {
        //do nothing, endpoint not known yet. i.e., leave status 'unchecked'
      }
     
      if (status == AccessibilityStatus.UNCHECKED) {
View Full Code Here

  }

  @Override
  public void clearPrivateCompletions(FetchType type, FetchMethod method, String endpoint) throws IllegalArgumentException {
    try {
      DbHelper db = new DbHelper(new File(getServletContext().getRealPath("/")), getThreadLocalRequest());
      int endpointId = db.getEndpointId(endpoint, EndpointPrivateFlag.OWN);
      db.clearPreviousAutocompletionFetches(endpointId, method, type);
    } catch (Exception e) {
      throw new IllegalArgumentException(e.getMessage());
    }
   
  }
View Full Code Here

    this.method = method;
    this.endpoint = endpoint;
    this.partialCompletion = partialCompletion;
    this.maxResults = maxResults;
   
    this.dbHelper = new DbHelper(new File(configDir), request);
   
    try {
      endpointId = getEndpointId(dbHelper, endpoint);
    } catch (EndpointIdException e) {
      //endpoint not reachable, AND user not logged in
View Full Code Here

TOP

Related Classes of com.data2semantics.yasgui.server.db.DbHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.