Package org.eclipse.orion.internal.server.servlets.workspace

Examples of org.eclipse.orion.internal.server.servlets.workspace.WebProject


     
   

  }
  private boolean checkMaqettaProject(JSONObject projectObject) throws JSONException, CoreException{
    WebProject project = WebProject.fromId(projectObject.getString("Id"));
    IFileStore settings;
    settings = project.getProjectStore().getChild(IDavinciServerConstants.SETTINGS_DIRECTORY_NAME);
    if (settings == null)
      return false;
      IFileStore libFile = settings.getChild(IDavinciServerConstants.LIBS_FILE);
    if (libFile != null && libFile.fetchInfo().exists())
      return true;
View Full Code Here


  }

  public IStorage newInstance(String name) {
    IPath path = new Path(name);
    String seg1 = path.segment(0);
    WebProject project = webWorkspace.getProjectByName(seg1);
    if (project == null) {
      // Trying to create a new instance of a project which doesn't currently exist.  However,
      // since all projects are first created through direct calls to `create()`, a null
      // value here most likely means that we have an invalid URL.
View Full Code Here

    if (existing != null) {
      return existing;
    }
   
    String id = WebProject.nextProjectId();
    WebProject project = WebProject.fromId(id);
   
    project.setName(name);
   
    try {
      DummyRequest req = new DummyRequest(userName);
      WorkspaceResourceHandler.computeProjectLocation(req, project, null, true);
    } catch (URISyntaxException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    } catch (CoreException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }

    try {
      //If all went well, add project to workspace
      WorkspaceResourceHandler.addProject(userName, webWorkspace, project);
    } catch (CoreException e) {
      e.printStackTrace();       
    }
   
    try {
      return new VOrionProjectStorage(name, project.getProjectStore(),project,this);
    } catch (CoreException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
 
View Full Code Here

    try {
      allProjects = webWorkspace.getProjectsJSON();
      for(int i=0;i<allProjects.length();i++){
        JSONObject projObj = (JSONObject)allProjects.opt(i);
        String id = projObj.getString("Id");
        WebProject result = WebProject.fromId(id);
        String name = result.getName();
        try {
          projects.add(new VOrionProjectStorage(name, result.getProjectStore(), result, this));
        } catch (CoreException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

    orionPath = orionPath.removeFirstSegments(orionPath.matchingFirstSegments(contextPath));

    String workspaceId = orionPath.segment(1)// [0]: "file", [1]: workspace id, [2]: project name, [3] sub-folder, ...
    String projectName = orionPath.segment(2);

    WebProject proj = WebWorkspace.fromId(workspaceId).getProjectByName(projectName);

    String path = projectName;
    IFileStore child = null;
    for (int i = 3; i < orionPath.segmentCount(); i++) {
      child = proj.getProjectStore().getChild(orionPath.segment(i));
      path += "/" + child.getName();
    }
    return path;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.orion.internal.server.servlets.workspace.WebProject

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.