BrightSide Workbench Full Report + Source Code
org.turro.erp.time.XMLHumanResourceSet Class Reference
Inheritance diagram for org.turro.erp.time.XMLHumanResourceSet:
Collaboration diagram for org.turro.erp.time.XMLHumanResourceSet:

Public Member Functions

 XMLHumanResourceSet (IConstructor constructor)
 
String getName (XMLTimeControl tc)
 
void saveCollection ()
 

Static Public Attributes

static final String XML_HUMANRESOURCE = "/WEB-INF/local/humanResource.xml"
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 43 of file XMLHumanResourceSet.java.

Constructor & Destructor Documentation

◆ XMLHumanResourceSet()

org.turro.erp.time.XMLHumanResourceSet.XMLHumanResourceSet ( IConstructor  constructor)

Definition at line 49 of file XMLHumanResourceSet.java.

49  {
50  this.constructor = constructor;
51  loadCollection();
52  }

Member Function Documentation

◆ getName()

String org.turro.erp.time.XMLHumanResourceSet.getName ( XMLTimeControl  tc)

Definition at line 54 of file XMLHumanResourceSet.java.

54  {
55  for(XMLHumanResource hr : this) {
56  if(hr.getId() == tc.getHumanResourceId()) {
57  return hr.getName();
58  }
59  }
60  return null;
61  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveCollection()

void org.turro.erp.time.XMLHumanResourceSet.saveCollection ( )

Definition at line 63 of file XMLHumanResourceSet.java.

63  {
64  Document doc = new Document(new Element("human-resources"));
65  writeXML(doc.getRootElement());
66  try {
67  OutputStreamWriter fw = FileUtil.getFileWriter(
68  ElephantContext.getRealPath(XML_HUMANRESOURCE));
69  Format fm = Format.getPrettyFormat();
70  fm.setEncoding(ElephantContext.getEncoding());
71  XMLOutputter xo = new XMLOutputter(fm);
72  xo.output(doc, fw);
73  fw.close();
74  } catch (IOException ex) {
75  Logger.getLogger(XMLHumanResourceSet.class.getName()).log(Level.SEVERE, null, ex);
76  }
77  }
XMLHumanResourceSet(IConstructor constructor)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ XML_HUMANRESOURCE

final String org.turro.erp.time.XMLHumanResourceSet.XML_HUMANRESOURCE = "/WEB-INF/local/humanResource.xml"
static

Definition at line 45 of file XMLHumanResourceSet.java.


The documentation for this class was generated from the following file: