Package com.projectlibre.pm.calendar

Examples of com.projectlibre.pm.calendar.WorkCalendar


      Long constraintDate=(Long)converter.to(task.get("constraintDate"));
      openprojTask.setScheduleConstraint(constraintType.getId(),constraintDate==null?0:constraintDate);
    }
   
    //find calendar
    WorkCalendar calendar=task.getCalendar();
    if (calendar!=null){
      com.projity.pm.calendar.WorkCalendar openprojCalendar=state.getMappedOpenprojBaseCalendar(calendar.getId());
      if (openprojCalendar==null)
        log.warning("Calendar "+calendar.getId()+" for task "+task.getId()+" not found");
      else
        openprojTask.setWorkCalendar(openprojCalendar);
    }
  }
View Full Code Here


    FieldUtil.convertFields(resource, com.projity.pm.resource.Resource.class, openprojResource, fieldsToConvert, false);
    FieldUtil.convertFields(resource, CustomFields.class, openprojResource.getCustomFields(), customFieldsToConvert, false);
   
   
    //find calendar
    WorkCalendar calendar=resource.getCalendar();
    if (calendar!=null){
      com.projity.pm.calendar.WorkCalendar openprojCalendar=state.getMappedOpenprojBaseCalendar(calendar.getId());
      if (openprojCalendar==null)
        log.warning("Calendar "+calendar.getId()+" for resource "+resource.getId()+" not found");
      else
        openprojResource.setWorkCalendar(openprojCalendar);
    }

   
View Full Code Here

  };
  public void to(com.projity.pm.task.Project openprojProject, Project project, OpenprojImportState state) {
    FieldUtil.convertFields(project, com.projity.pm.task.Project.class, openprojProject, fieldsToConvert, false);

    //find calendar
    WorkCalendar calendar=project.getCalendar();
    if (calendar!=null){
      com.projity.pm.calendar.WorkCalendar openprojCalendar=state.getMappedOpenprojBaseCalendar(calendar.getId());
      if (openprojCalendar==null)
        log.warning("Calendar "+calendar.getId()+" for task "+project.getId()+" not found");
      else {
        try {
          openprojProject.setBaseCalendar(openprojCalendar);
        } catch (CircularDependencyException e) {
          // TODO Auto-generated catch block
View Full Code Here

    state.setCalendarManager(project.getCalendarManager());
    state.setProjectTitle(mpxProjectFile.getProjectHeader().getProjectTitle());
   
    MpxCalendarConverter converter=new MpxCalendarConverter();
    for (ProjectCalendar mpxBaseCalendar : mpxProjectFile.getBaseCalendars()) {
      WorkCalendar calendar=new DefaultWorkCalendar();
      if (ProjectCalendar.DEFAULT_BASE_CALENDAR_NAME.equals(mpxBaseCalendar.getName())){
        state.setMpxStandardBaseCalendar(mpxBaseCalendar);
        project.getCalendarManager().setStandardBaseCalendar(calendar);
      }
      converter.from(mpxBaseCalendar, calendar, state);
View Full Code Here

    state.getCalendarManager().fixBaseCalendar(calendar, state.getProjectTitle());
    calendar.setId(new CalendarId(mpxCalendar.getUniqueID()));
   
   
    //base calendar
    WorkCalendar standardCalendar = state.getCalendarManager().getStandardBaseCalendar();
    ProjectCalendar mpxBaseCalendar=null;
    WorkCalendar baseCalendar=null;
    if (mpxCalendar.isDerived()) {
      mpxBaseCalendar = mpxCalendar.getParent();
      if (mpxBaseCalendar==null){
        mpxBaseCalendar=state.getMpxStandardBaseCalendar();
      }
View Full Code Here

  public void from(net.sf.mpxj.Resource mpxResource, Resource resource, MpxImportState state) {
    //convert fields
    FieldUtil.convertFields(resource, net.sf.mpxj.Resource.class, mpxResource, fieldsToConvert, true);
   
    //convert calendar
    WorkCalendar calendar;
    if (mpxResource.getResourceCalendar()==null){
      calendar=state.getProjectBaseCalendar();
    }else{
      calendar=new DefaultWorkCalendar();
      calendar.setName(mpxResource.getName());
      MpxCalendarConverter calendarConverter=new MpxCalendarConverter();
      calendarConverter.from(mpxResource.getResourceCalendar(), calendar, state);
    }
    resource.setCalendar(calendar);
  }
View Full Code Here

    "scheduleFrom","scheduleFrom", "com.projectlibre.core.pm.exchange.converters.mpx.type.MpxScheduleFromConverter",
  };
  public void from(ProjectHeader mpxProjectHeader, Project project, MpxImportState state) {
    FieldUtil.convertFields(project, net.sf.mpxj.ProjectHeader.class, mpxProjectHeader, fieldsToConvert, true);

    WorkCalendar calendar=null;;
    if (mpxProjectHeader.getCalendarName()!=null)
      calendar=state.getMappedBaseCalendar(mpxProjectHeader.getCalendarName());
    if (calendar==null) calendar=state.getCalendarManager().getStandardBaseCalendar();
    project.setCalendar(calendar);
  }
View Full Code Here

  public void from(net.sf.mpxj.Task mpxTask, Task task, MpxImportState state) {
    //convert fields
    FieldUtil.convertFields(task, net.sf.mpxj.Task.class, mpxTask, fieldsToConvert, true);
   
    //convert calendar
    WorkCalendar calendar;
    if (mpxTask.getCalendar()==null){
      calendar=state.getProjectBaseCalendar();
    }else{
      calendar=new DefaultWorkCalendar();
      calendar.setName(mpxTask.getName());
      MpxCalendarConverter calendarConverter=new MpxCalendarConverter();
      calendarConverter.from(mpxTask.getCalendar(), calendar, state);
    }
    task.setCalendar(calendar);
  }
View Full Code Here

TOP

Related Classes of com.projectlibre.pm.calendar.WorkCalendar

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.