Package com.projity.server.data

Examples of com.projity.server.data.ProjectData


        return null;
    }
    return !openAs;
  }
  public static String getLockerName(long projectId) {
    ProjectData projectData = (ProjectData)ProjectFactory.getProjectData(projectId);
    System.out.println("Locked is " + projectData.isLocked() + "  Lock info: User is " + Environment.getUser().getUniqueId() + "  locker id is " + projectData.getLockedById() + " locker is "+projectData.getLockedByName() );

    if (projectData != null && projectData.isLocked()) {

      if (Environment.getUser().getUniqueId() != projectData.getLockedById())
        return projectData.getLockedByName();
    }
    return null;
  }
View Full Code Here


        return null;
    }
    return !openAs;
  }
  public static String getLockerName(long projectId) {
    ProjectData projectData = (ProjectData)ProjectFactory.getProjectData(projectId);
    System.out.println("Locked is " + projectData.isLocked() + "  Lock info: User is " + Environment.getUser().getUniqueId() + "  locker id is " + projectData.getLockedById() + " locker is "+projectData.getLockedByName() );

    if (projectData != null && projectData.isLocked()) {

      if (Environment.getUser().getUniqueId() != projectData.getLockedById())
        return projectData.getLockedByName();
    }
    return null;
  }
View Full Code Here

    public int getRowCount() {
      return projects.size();
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
      ProjectData project=(ProjectData)projects.get(rowIndex);
//      try {
      switch (columnIndex) {
      case 0:
        return project.getName();

      case 1:
        return project.getLockerInfo();
      case 2:
//        try {
            return FieldConverter.toString(project.getLastModificationDate());
//          } catch (FieldParseException e) {
//            return null;
//          }

      case 3:
        if (project.isMaster()) return null;
        return FieldConverter.toString(project.getCreationDate());


      default:
        break;
      }
View Full Code Here

        break;
      }
      tc.setCellRenderer(new DefaultTableCellRenderer(){
        //protected Color defaultColor;
        public Component getTableCellRendererComponent(JTable table, Object value, boolean selected, boolean focused, int row, int column){
          ProjectData project=(ProjectData)projects.get(row);
          setEnabled(table == null || table.isEnabled());
          //if (defaultColor==null) defaultColor=getForeground();
          setForeground((canBeUsed(project))?Color.BLACK:Color.GRAY);
          super.getTableCellRendererComponent(table, value, selected, focused, row, column);
          return this;
View Full Code Here

      if (index0!=index1){
        return;
      }

      ProjectData project=(ProjectData)projects.get(index0);
      if (!allowMaster && project.isMaster()) {
        ok.setEnabled(false);
        if (openReadOnly != null)
          openReadOnly.setEnabled(false);
        resourcePoolMessage.setVisible(true);
      } else {
        resourcePoolMessage.setVisible(false);
        ok.setEnabled(canBeUsed(project));
        if (allowOpenAs && openReadOnly != null)
          openReadOnly.setEnabled(!project.isMaster());

        else{
          if (!canBeUsed(project)){
            clearSelection();
            return;
View Full Code Here

    if (get) {
    } else {
      int row=table.getSelectedRow();
      if (row<0||row>=projects.size()) form=null;
      else{
        ProjectData project=(ProjectData)projects.get(row);
        boolean copy = this.openCopy || !canBeUsed(project);
        this.openCopy = false; // for next time;
        if (!allowMaster && project.isMaster())
          return false;

        System.out.println("open " + project.getName() + " copy " + copy);

        form=new Object[]{project,copy};
      }

    }
View Full Code Here

    form.setUnassignedResource(unassigned);
    projityResources.add(unassigned);

    Serializer serializer=new Serializer();

    ProjectData projectData=(ProjectData)serializer.serialize(existingProject,ProjectData.FACTORY,null);
        if (existingProject.isForceNonIncremental()) projectData.setVersion(0);
        projectData.setMaster(existingProject.isMaster());

        //resources
        Map resourceMap=serializer.saveResources(existingProject,projectData);
        List<com.projity.pm.resource.Resource> existingResources=(List<com.projity.pm.resource.Resource>)existingProject.getResourcePool().getResourceList();
        for (com.projity.pm.resource.Resource resource:existingResources){
View Full Code Here

TOP

Related Classes of com.projity.server.data.ProjectData

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.