BrightSide Workbench Full Report + Source Code
org.turro.log.SystemLogs Class Reference
Inheritance diagram for org.turro.log.SystemLogs:
Collaboration diagram for org.turro.log.SystemLogs:

Public Member Functions

void doLog (SystemLogType type, Object entity, String comment, Serializable data)
 
void doLog (SystemLogType type, String entityPath, String comment, Serializable data)
 
void doLog (SystemLogType type, IElephantEntity entity, String comment, Serializable data)
 
void doLog (SystemLogType type, IContact contact, Object entity, String comment, Serializable data)
 
void doLog (SystemLogType type, IContact contact, String entityPath, String comment, Serializable data)
 
void doLog (SystemLogType type, IContact contact, IElephantEntity entity, String comment, Serializable data)
 
void doLog (SystemLogType type, String generatorPath, String entityPath, String comment, Serializable data)
 
void doLog (SystemLogType type, IElephantEntity generator, IElephantEntity entity, String comment, Serializable data)
 
ILogWrapper info ()
 
ILogWrapper warning ()
 
ILogWrapper severe ()
 
ILogWrapper type (SystemLogType type)
 
long getCountOf (String comment, String logPath, Date since)
 
Date getLastDateOf (String entityPath, String comment)
 
void cleanup (String logPath)
 
IElephantEntity getGenerator (Object from)
 

Detailed Description

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

Definition at line 37 of file SystemLogs.java.

Member Function Documentation

◆ cleanup()

void org.turro.log.SystemLogs.cleanup ( String  logPath)

Implements org.turro.log.ISystemLogger.

Definition at line 131 of file SystemLogs.java.

131  {
132  new SystemLogModel().cleanup(logPath);
133  }
Here is the call graph for this function:

◆ doLog() [1/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
IContact  contact,
IElephantEntity  entity,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 65 of file SystemLogs.java.

65  {
66  doLog(type, getGenerator(contact), entity, comment, data);
67  }
IElephantEntity getGenerator(Object from)
ILogWrapper type(SystemLogType type)
void doLog(SystemLogType type, Object entity, String comment, Serializable data)
Definition: SystemLogs.java:40
Here is the call graph for this function:

◆ doLog() [2/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
IContact  contact,
Object  entity,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 55 of file SystemLogs.java.

55  {
56  doLog(type, getGenerator(contact), Entities.getController(entity), comment, data);
57  }
IElephantEntity getController(String entityPath)
Here is the call graph for this function:

◆ doLog() [3/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
IContact  contact,
String  entityPath,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 60 of file SystemLogs.java.

60  {
61  doLog(type, getGenerator(contact), Entities.getController(entityPath), comment, data);
62  }
Here is the call graph for this function:

◆ doLog() [4/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
IElephantEntity  entity,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 50 of file SystemLogs.java.

50  {
51  doLog(type, getGenerator(Authentication.getRealIContact()), entity, comment, data);
52  }
Here is the call graph for this function:

◆ doLog() [5/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
IElephantEntity  generator,
IElephantEntity  entity,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 75 of file SystemLogs.java.

75  {
76  SystemLog entry = new SystemLog();
77  entry.setDateLog(new Date());
78  entry.setCounts(1);
79  if((generator == null) || (generator instanceof EmptyController)) {
80  entry.setGeneratorPath("#");
81  entry.setGeneratorName("Unknown");
82  } else {
83  entry.setGeneratorPath(generator.getPath());
84  entry.setGeneratorName(generator.getNameOrLabel());
85  }
86  if((entity == null) || (entity instanceof EmptyController)) {
87  entry.setEntityPath("#");
88  entry.setEntityName("Unknown");
89  } else {
90  entry.setEntityPath(entity.getPath());
91  entry.setEntityName(entity.getNameOrLabel());
92  }
93  entry.setComment(comment);
94  entry.setObject(data);
95  entry.setLogType(type);
96  new ElephantPU().saveObject(entry);
97  }
Here is the call graph for this function:

◆ doLog() [6/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
Object  entity,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 40 of file SystemLogs.java.

40  {
41  doLog(type, getGenerator(Authentication.getRealIContact()), Entities.getController(entity), comment, data);
42  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doLog() [7/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
String  entityPath,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 45 of file SystemLogs.java.

45  {
46  doLog(type, getGenerator(Authentication.getRealIContact()), Entities.getController(entityPath), comment, data);
47  }
Here is the call graph for this function:

◆ doLog() [8/8]

void org.turro.log.SystemLogs.doLog ( SystemLogType  type,
String  generatorPath,
String  entityPath,
String  comment,
Serializable  data 
)

Implements org.turro.log.ISystemLogger.

Definition at line 70 of file SystemLogs.java.

70  {
71  doLog(type, getGenerator(generatorPath), Entities.getController(entityPath), comment, data);
72  }
Here is the call graph for this function:

◆ getCountOf()

long org.turro.log.SystemLogs.getCountOf ( String  comment,
String  logPath,
Date  since 
)

Implements org.turro.log.ISystemLogger.

Definition at line 120 of file SystemLogs.java.

120  {
121  return new SystemLogModel().getCountOf(comment, logPath, since);
122  }
Here is the call graph for this function:

◆ getGenerator()

IElephantEntity org.turro.log.SystemLogs.getGenerator ( Object  from)

Definition at line 135 of file SystemLogs.java.

135  {
136  IElephantEntity generator = null;
137  if(from instanceof IContact) {
138  generator = Entities.getController(((IContact) from).getContact());
139  } else {
140  generator = Entities.getController(from);
141  }
142  return generator;
143  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLastDateOf()

Date org.turro.log.SystemLogs.getLastDateOf ( String  entityPath,
String  comment 
)

Implements org.turro.log.ISystemLogger.

Definition at line 125 of file SystemLogs.java.

125  {
126  SystemLog log = new SystemLogModel().lastEntry(entityPath, comment);
127  return log == null ? null : log.getDateLog();
128  }
Here is the call graph for this function:

◆ info()

ILogWrapper org.turro.log.SystemLogs.info ( )

Implements org.turro.log.ISystemLogger.

Definition at line 100 of file SystemLogs.java.

100  {
101  return LogWrapper.info();
102  }
Here is the call graph for this function:

◆ severe()

ILogWrapper org.turro.log.SystemLogs.severe ( )

Implements org.turro.log.ISystemLogger.

Definition at line 110 of file SystemLogs.java.

110  {
111  return LogWrapper.severe();
112  }
Here is the call graph for this function:

◆ type()

ILogWrapper org.turro.log.SystemLogs.type ( SystemLogType  type)

Implements org.turro.log.ISystemLogger.

Definition at line 115 of file SystemLogs.java.

115  {
116  return LogWrapper.type(type);
117  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ warning()

ILogWrapper org.turro.log.SystemLogs.warning ( )

Implements org.turro.log.ISystemLogger.

Definition at line 105 of file SystemLogs.java.

105  {
106  return LogWrapper.warning();
107  }
Here is the call graph for this function:

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