Examples of HumanResource


Examples of au.edu.qut.yawl.admintool.model.HumanResource

        _model.addRole("Manager");
        _model.addRole("Worker");
        _model.addRole("Buyer");
        _model.addRole("Earner");
        HumanResource fredRes = new HumanResource("fred");
        fredRes.setDescription("A description about Fred");
        fredRes.setGivenName("Fred");
        fredRes.setIsAdministrator(true);
        fredRes.setIsOfResSerPosType("Resource");
        fredRes.setPassword("password");
        fredRes.setSurname("Jones");
        _model.addResource(fredRes);

        HumanResource peteRes = new HumanResource("Pete");
        peteRes.setDescription("A description about Pete");
        peteRes.setGivenName("Pete");
        peteRes.setIsAdministrator(true);
        peteRes.setIsOfResSerPosType("Resource");
        peteRes.setPassword("password");
        peteRes.setSurname("Hubbert");
        _model.addResource(peteRes);

        _model.addHresPerformsRole("fred", "Manager");
    }
View Full Code Here

Examples of au.edu.qut.yawl.admintool.model.HumanResource

            logger.info("Restoring Users");
            Query query = pmgr.createQuery("from au.edu.qut.yawl.admintool.model.Resource" +
                    " where IsOfResourceType = 'Human'");

            for (Iterator it = query.iterate(); it.hasNext();) {
                HumanResource user = (HumanResource) it.next();
                logger.debug("Restoring user '" + user.getRsrcID() + "'");
                UserList.getInstance().addUser(
                        user.getRsrcID(),
                        user.getPassword(),
                        user.getIsAdministrator());
            }

            //Lachlan: later we delete these loaded services and reload them anew
            //this seems kind of redundant, don't you think?
            logger.info("Restoring Services");
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

            // GanttCalendar.parseXMLDate(attrs.getValue(i)).getTime()

            String startAsString = atts.getValue("start");
            String endAsString = atts.getValue("end");
            String resourceIdAsString = atts.getValue("resourceid");
            HumanResource hr;
            hr = (HumanResource) myResourceManager.getById(Integer
                    .parseInt(resourceIdAsString));
            hr.addDaysOff(new GanttDaysOff(GanttCalendar
                    .parseXMLDate(startAsString), GanttCalendar
                    .parseXMLDate(endAsString)));
        } catch (NumberFormatException e) {
            System.out
                    .println("ERROR in parsing XML File year is not numeric: "
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

        HumanResourceManager hrm = (HumanResourceManager) m_project
                .getHumanResourceManager();
        LinkedList resources = mpx.getAllResources();
        Iterator iter = resources.iterator();
        Resource resource;
        HumanResource people;

        while (iter.hasNext() == true) {
            resource = (Resource) iter.next();
            if (resource.getName() != null) {
                people = hrm.newHumanResource();
                people.setName(resource.getName());
                people.setMail(resource.getEmailAddress());
                hrm.add(people);

                m_resourceMap
                        .put(resource.getID(), new Integer(people.getId()));
            }
        }
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

        // were loaded.
        if (load == 0) {
            load = 100;
        }

        HumanResource human = (HumanResource) getResourceManager().getById(
                resourceId);
        if (human == null) {
            throw new FileFormatException("Human resource with id="
                    + resourceId + " not found");
        }
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

     * Process resource data.
     */
    private void processResources() {
        try {
            List resources = myHrManager.getResources();
            HumanResource ganttResource;
            Resource mpxResource;

            for (int i = 0; i < resources.size(); i++) {
                ganttResource = (HumanResource) resources.get(i);

                mpxResource = m_mpx.addResource();
                mpxResource.setName(ganttResource.getName());
                mpxResource.setEmailAddress(ganttResource.getMail());

                m_ganttMpxResourceMap.put(new Integer(ganttResource.getId()),
                        mpxResource.getUniqueID());
            }
        }

        catch (Exception ex) {
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

    /** Send an Email to the current resource */
    public void sendMail(GanttProject parent) {
      if(table != null && table.getSelectedNodes()!=null && table.getSelectedNodes().length>0)
      {
        HumanResource people = (HumanResource) table.getSelectedNodes()[0]
                .getUserObject();
        if (people != null) {
          try {
            BrowserControl.displayURL("mailto:" + people.getMail());
          } catch (Exception e) {
            System.err.println(e);
          }
        }
      }
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

    void save(IGanttProject project, TransformerHandler handler) throws SAXException {
        AttributesImpl attrs = new AttributesImpl();
        startElement("vacations", handler);
        ProjectResource[] resources = project.getHumanResourceManager().getResourcesArray();
        for (int i = 0; i < resources.length; i++) {
            HumanResource p = (HumanResource) resources[i];
            if (p.getDaysOff() != null)
                for (int j = 0; j < p.getDaysOff().size(); j++) {
                    GanttDaysOff gdo = (GanttDaysOff) p.getDaysOff()
                            .getElementAt(j);
                    addAttribute("start", gdo.getStart().toXMLString(), attrs);
                    addAttribute("end", gdo.getFinish().toXMLString(), attrs);
                    addAttribute("resourceid", String.valueOf(p.getId()), attrs);
                    emptyElement("vacation", attrs, handler);
                }
        }
        endElement("vacations", handler);
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

        final AttributesImpl attrs = new AttributesImpl();
        startElement("resources", handler);
        saveCustomColumnDefinitions(project, handler);
        ProjectResource[] resources = project.getHumanResourceManager().getResourcesArray();
        for (int i = 0; i < resources.length; i++) {
            HumanResource p = (HumanResource) resources[i];
            addAttribute("id", String.valueOf(p.getId()), attrs);
            addAttribute("name", p.getName(), attrs);
            addAttribute("function", p.getRole().getPersistentID(), attrs);
            addAttribute("contacts", p.getMail(), attrs);
            addAttribute("phone", p.getPhone(), attrs);
            startElement("resource", attrs, handler);
            {
              saveCustomProperties(project, p, handler);
            }
            endElement("resource", handler);
View Full Code Here

Examples of net.sourceforge.ganttproject.resource.HumanResource

      myCustomPropertyManager.createDefinition(id, type, name, defaultValue);
  }

  /** Las a resources */
    private void loadResource(Attributes atts) {
        final HumanResource hr;

        try {
            String id = atts.getValue("id");
            if (id == null) {
                hr = getResourceManager().newHumanResource();
                hr.setName(atts.getValue("name"));
                getResourceManager().add(hr);
            } else {
                hr = (HumanResource) getResourceManager().create(
                        atts.getValue("name"), Integer.parseInt(id));
            }
            myCurrentResource = hr;
        } catch (NumberFormatException e) {
            System.out.println("ERROR in parsing XML File id is not numeric: "
                    + e.toString());
            return;
        }

        hr.setMail(atts.getValue("contacts"));
        hr.setPhone(atts.getValue("phone"));
        try {
            String roleID = atts.getValue("function");
            myLateResource2roleBinding.put(hr, roleID);
            // hr.setFunction(Integer.parseInt());
        } catch (NumberFormatException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.