Package maqetta.core.server.user

Examples of maqetta.core.server.user.ReviewManager$ReviewerVersionFile


            SimpleDateFormat sdf = new SimpleDateFormat(Constants.DATE_PATTERN);
            sdf.setCalendar(Calendar.getInstance(new SimpleTimeZone(0, "GMT")));
            returnValue = sdf.format((Date) returnValue);
          }
          if ("email".equals(fieldName)) {
            ReviewManager commentingManager = ReviewManager.getReviewManager();
            Reviewer reviewerUser = commentingManager.getReviewer(returnValue.toString());
            String displayName = reviewerUser.getDisplayName();
            writer.addField("displayName", null != displayName ? displayName: returnValue.toString());
          }
        } catch (Exception e) {
          returnValue = new Object();
View Full Code Here


public class GetLatestVersionId extends Command{

    public void handleCommand(HttpServletRequest req, HttpServletResponse resp,
        IUser user) throws IOException {
      ReviewManager cm = ReviewManager.getReviewManager();
      IDesignerUser reviewUser = cm.getDesignerUser(user);
      int latestVersionID = 1;
      if(reviewUser.getLatestVersion() !=null&&reviewUser.getVersion(reviewUser.getLatestVersion().getTime())!=null){
        latestVersionID = Integer.parseInt(reviewUser.getLatestVersion().getVersionID())+1;
      }
      else{
View Full Code Here

  public void handleCommand(HttpServletRequest req, HttpServletResponse resp, IUser user)
      throws IOException {

    String designerIDParm = (String) req.getParameter("designer");
   
    ReviewManager commentingManager = ReviewManager.getReviewManager();

    String userEmail = user.getPerson().getEmail();
    Reviewer reviewerUser = commentingManager.getReviewer(userEmail);

    JSONWriter writer = new JSONWriter(true);
    Iterator<ReviewerVersion> iterator = reviewerUser.getReviewerVersions();
    while (iterator.hasNext()) {
      ReviewerVersion reviewerVersion = iterator.next();

      String reviewDesignerID = reviewerVersion.getDesignerID();
      String reviewTime = reviewerVersion.getTimeVersion();
      if (designerIDParm == null || designerIDParm.equals("") || designerIDParm.equals(reviewDesignerID)) {
        IDesignerUser designerUser = commentingManager.getDesignerUser(reviewDesignerID);
        /* designer user removed from the system (or never existed) */
        if(designerUser==null) continue;
        Version version = designerUser.getVersion(reviewTime);

        if (version != null) {
View Full Code Here

public class ListReviewFiles extends Command {

  public void handleCommand(HttpServletRequest req, HttpServletResponse resp, IUser user)
      throws IOException {
    ReviewManager commentingManager = ReviewManager.getReviewManager();
    String designerName = req.getParameter("designer");
    if(designerName ==null||designerName.equals(""))
      designerName = user.getUserID();
    IDesignerUser designer = commentingManager.getDesignerUser(designerName);
    Version version = designer.getVersion(req.getParameter("version"));
    List<String> resource = version.getResources();
    JSONWriter writer = new JSONWriter(true);
    for (String it : resource) {
      writer.startObject();
View Full Code Here

    String type = req.getParameter("type"); // three types: close, open, delete and publish
    String vTime = req.getParameter("vTime");
    IDesignerUser du = ReviewManager.getReviewManager()
        .getDesignerUser(user);
    Version version = du.getVersion(vTime);
    ReviewManager reviewManager = ReviewManager.getReviewManager();
    if ("close".equalsIgnoreCase(type)) {
      version.closeVersion();
      reviewManager.saveVersionFile(du);
    } else if ("open".equalsIgnoreCase(type)) {
      version.openVersion();
      version.setHasRestarted(false);
      reviewManager.saveVersionFile(du);
    } else if ("publish".equalsIgnoreCase(type)) {
      version.setDraft(false);
      reviewManager.publish(du, version);
    } else if ("delete".equalsIgnoreCase(type)) {
      du.deleteVersion(vTime);
      reviewManager.saveVersionFile(du);
      IDavinciProject project = new DavinciProject();
      project.setOwnerId(du.getName());
      ReviewCacheManager.$.clearReviewByProject(project);
      // TODO delete the version folder
    }
View Full Code Here

TOP

Related Classes of maqetta.core.server.user.ReviewManager$ReviewerVersionFile

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.