コード例 #1
0
  /* Sharepoint pilotProject json data creation */
  public void publishMetaData() throws PhrescoException {

    ProjectInfo info = new ProjectInfo();
    info.setName("PilotSharePoint");
    info.setCode("PHR_PilotSharePoint");
    info.setDescription("");
    info.setApplication("apptype-webapp");

    Technology tech = new Technology();
    tech.setId("tech-sharepoint");
    tech.setName("Sharepoint");

    tech.setFrameworks(null);

    info.setTechnology(tech);
    info.setPilotProjectUrls(new String[] {"/pilots/tech-sharepoint/0.1/tech-sharepoint-0.1.zip"});
    Gson gson = new Gson();

    String json = gson.toJson(info);
    try {
      FileWriter write = new FileWriter("sharepointJson.pilots");
      write.write(json);
      write.close();
      ArtifactInfo aInfo =
          new ArtifactInfo(
              PilotProjectManager.PILOT_GROUP, TechnologyTypes.SHAREPOINT, "", "pilots", "0.1");
      File artifact = new File("sharepointJson.pilots");
      repManager.addArtifact(aInfo, artifact);

    } catch (IOException e) {
      throw new PhrescoException(e);
    }
  }
コード例 #2
0
 /* publish SharepointPilotProject to desired path */
 public void publishPilotProject() throws PhrescoException {
   ArtifactInfo info =
       new ArtifactInfo(
           PilotProjectManager.PILOT_GROUP, TechnologyTypes.SHAREPOINT, "", "zip", "0.1");
   File artifact =
       new File(
           PilotProjectManager.PILOT_BASE
               + "\\sharepoint\\ResourceManagement\\build\\ResourceManagement.zip");
   repManager.addArtifact(info, artifact);
 }