|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.opnworks.timesheet.core.TimesheetSystem
This class implements the Singleton pattern and provide a series of services for the Timesheet system
| Field Summary | |
static TimesheetSystem |
INSTANCE
Field referring to the singleton instance |
| Constructor Summary | |
TimesheetSystem()
Default constructor |
|
| Method Summary | |
void |
addActivityType(ActivityType activityType)
Adds a feature to the ActivityType attribute of the TimesheetSystem object |
void |
addChangeListener(IViewer viewer)
|
void |
addTimesheet(Timesheet timesheet)
Add a timesheet |
void |
closePersistenceSession()
Description of the Method |
net.sf.hibernate.Query |
createQuery(java.lang.String string)
|
void |
delete(IPersistent object,
java.lang.Class clazz)
Description of the Method |
java.util.List |
getActivityTypes()
Return the collection of activity types |
java.util.List |
getChangeListeners(java.lang.Class clazz)
Return a collection of change listeners |
TimesheetSystemConfiguration |
getConfig()
|
IPerson |
getEmployee()
Return the employee |
IOrganization |
getEmployer()
|
Invoice |
getInvoice(IOrganization customer,
java.util.Calendar startDate,
java.util.Calendar endDate)
|
java.util.List |
getInvoices(IOrganization customer)
Return the collection of invoices associated with customer |
java.util.Locale |
getLocale()
Return the locale |
java.lang.Object |
getObject(java.lang.Class clazz,
java.lang.Long id)
|
java.util.List |
getObjectsWithName(java.lang.Class clazz,
java.lang.String name)
Return the collection of INamedObject(s) of a given class. |
java.util.List |
getOrganizations()
|
java.util.List |
getProjects()
|
java.util.List |
getProjects(IOrganization sponsor)
Return a collection of projects sponsored by sponsor |
java.util.List |
getRootActivityTypes()
Return the collection of root activity types (parent activities) |
Timesheet |
getTimesheetForWeek(Week week,
IPerson owner)
Return the timesheets for a specific week and person |
java.util.List |
getTimesheets()
Return the collection of timesheets |
java.util.List |
getTimesheetsForWeek(Week week)
Return the collection of timesheets for a specific week |
java.util.List |
getTimesheetsForWeek(Week week,
IPerson owner)
Deprecated. |
Week |
getWeekForDate(java.sql.Date date)
|
java.util.List |
getWeeks()
Return the collection of weeks. |
boolean |
isConnected()
Returns a boolean if the session is connected |
net.sf.hibernate.Session |
persistenceSession()
Description of the Method |
java.util.List |
processQueryString(java.lang.String qString)
Description of the Method |
void |
removeActivityType(ActivityType activityType)
Remove an activity type |
void |
removeChangeListener(IViewer viewer)
|
void |
removeLineItem(TimesheetLineItem lineItem)
|
void |
removeOrganization(IOrganization organization)
|
void |
removeProject(Project project)
|
void |
removeTimesheet(Timesheet timesheet)
|
void |
removeWeek(Week week)
|
void |
save(IPersistent object,
java.lang.Class clazz)
Description of the Method |
void |
saveActivityType(ActivityType activityType)
|
void |
saveConfig()
Persist the configuration |
void |
saveInvoice(Invoice invoice)
|
void |
saveLineItem(TimesheetLineItem lineItem)
|
void |
saveParty(IParty party)
|
void |
saveProject(Project project)
|
void |
saveTimesheet(Timesheet timesheet)
Save a timesheet |
void |
saveWeek(Week week)
Save an instance of a Week |
void |
setConnectionProperties(java.util.Properties props)
Sets the ConnectionProperties attribute of the instance |
void |
setEmployee(IPerson person)
Set the employee for the instance |
void |
setEmployer(IOrganization organization)
Set the employer for the instance |
void |
setLocale(java.util.Locale locale)
Set the locale of the receiver |
void |
setProperties(java.util.Properties props)
Sets the Properties attribute of the TimesheetSystem object |
void |
shutdownDatabase()
Perform a Shutdown |
void |
triggerAddEvent(java.lang.Class clazz,
java.lang.Object object)
Trigger an "Add" event for the class clazz |
void |
triggerRemoveEvent(java.lang.Class clazz,
java.lang.Object object)
Trigger a "Remove" event for the class clazz |
void |
triggerUpdateEvent(java.lang.Class clazz,
java.lang.Object object)
Trigger an "Update" event for the class clazz |
void |
update(IPersistent object,
java.lang.Class clazz)
Description of the Method |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final TimesheetSystem INSTANCE
| Constructor Detail |
public TimesheetSystem()
| Method Detail |
public void setLocale(java.util.Locale locale)
locale -
public void setEmployee(IPerson person)
throws TimesheetException
person -
TimesheetException
public void setEmployer(IOrganization organization)
throws TimesheetException
organization -
TimesheetException
public void setConnectionProperties(java.util.Properties props)
throws TimesheetException
props - The new ConnectionProperties value
TimesheetException
public void setProperties(java.util.Properties props)
throws TimesheetException
props - The new Properties value
TimesheetException - Description of Exceptionpublic java.util.Locale getLocale()
public java.util.List getActivityTypes()
throws TimesheetException
getActivityTypes in interface IActivityListerTimesheetException
public java.util.List getRootActivityTypes()
throws TimesheetException
TimesheetException
public java.util.List getTimesheets()
throws TimesheetException
TimesheetException
public java.util.List getTimesheetsForWeek(Week week)
throws TimesheetException
week - a Week instance
TimesheetException
public Timesheet getTimesheetForWeek(Week week,
IPerson owner)
throws TimesheetException
week - Description of Parameterowner - Description of Parameter
TimesheetException - Description of Exception
public java.util.List getTimesheetsForWeek(Week week,
IPerson owner)
throws TimesheetException
week - Description of Parameterowner - Description of Parameter
TimesheetException - Description of Exception
public IPerson getEmployee()
throws TimesheetException
TimesheetException - Description of Exception
public IOrganization getEmployer()
throws TimesheetException
TimesheetException - Description of Exception
public java.util.List getWeeks()
throws TimesheetException
TimesheetException - Description of Exception
public java.util.List getObjectsWithName(java.lang.Class clazz,
java.lang.String name)
throws TimesheetException
clazz - Description of Parametername - Description of Parameter
TimesheetException - Description of Exception
public Week getWeekForDate(java.sql.Date date)
throws TimesheetException
date - A java.sql.Date
TimesheetException - Description of Exceptionpublic java.util.List getChangeListeners(java.lang.Class clazz)
clazz - Description of Parameter
public java.util.List getOrganizations()
throws TimesheetException
TimesheetException
public java.lang.Object getObject(java.lang.Class clazz,
java.lang.Long id)
throws TimesheetException
clazz - Description of Parameterid - Description of Parameter
TimesheetException
public java.util.List getProjects()
throws TimesheetException
TimesheetException
public java.util.List getProjects(IOrganization sponsor)
throws TimesheetException
sponsor - An Organization
TimesheetException
public java.util.List getInvoices(IOrganization customer)
throws TimesheetException
customer - An Organization
TimesheetException
public Invoice getInvoice(IOrganization customer,
java.util.Calendar startDate,
java.util.Calendar endDate)
throws TimesheetException
customer - An OrganizationstartDate - The invoice start dateendDate - Description of Parameter
TimesheetExceptionpublic boolean isConnected()
public TimesheetSystemConfiguration getConfig()
throws TimesheetException
TimesheetException
public void saveActivityType(ActivityType activityType)
throws TimesheetException
activityType - An ActivityType
TimesheetException
public void triggerAddEvent(java.lang.Class clazz,
java.lang.Object object)
clazz - Description of Parameterobject - Description of Parameter
public void triggerRemoveEvent(java.lang.Class clazz,
java.lang.Object object)
clazz - Description of Parameterobject - Description of Parameter
public void triggerUpdateEvent(java.lang.Class clazz,
java.lang.Object object)
clazz - Description of Parameterobject - Description of Parameter
public void removeActivityType(ActivityType activityType)
throws TimesheetException
removeActivityType in interface IActivityListeractivityType - An ActivityType
TimesheetException
public void addTimesheet(Timesheet timesheet)
throws TimesheetException
timesheet - A Timesheet
TimesheetException
public void saveTimesheet(Timesheet timesheet)
throws TimesheetException
timesheet -
TimesheetException - Description of Exception
public void removeTimesheet(Timesheet timesheet)
throws TimesheetException
timesheet - A Timesheet
TimesheetException
public void saveWeek(Week week)
throws TimesheetException
week - Description of Parameter
TimesheetException
public void saveProject(Project project)
throws TimesheetException
project - A Project
TimesheetException
public void saveParty(IParty party)
throws TimesheetException
party - A party
TimesheetException
public void saveInvoice(Invoice invoice)
throws TimesheetException
invoice - An Invoice
TimesheetException
public void saveConfig()
throws TimesheetException
TimesheetException - Description of Exception
public void removeOrganization(IOrganization organization)
throws TimesheetException
organization - Description of Parameter
TimesheetException
public void removeProject(Project project)
throws TimesheetException
project - A Project
TimesheetException
public void removeWeek(Week week)
throws TimesheetException
week - A week
TimesheetExceptionpublic void removeChangeListener(IViewer viewer)
viewer - public void addChangeListener(IViewer viewer)
viewer -
public net.sf.hibernate.Session persistenceSession()
throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public void closePersistenceSession()
throws TimesheetException
TimesheetException
public void addActivityType(ActivityType activityType)
throws TimesheetException
addActivityType in interface IActivityListeractivityType - The feature to be added to the
ActivityType attribute
TimesheetException
public java.util.List processQueryString(java.lang.String qString)
throws TimesheetException
qString - Description of Parameter
TimesheetException
public void saveLineItem(TimesheetLineItem lineItem)
throws TimesheetException
lineItem -
TimesheetException - Description of Exception
public void removeLineItem(TimesheetLineItem lineItem)
throws TimesheetException
lineItem -
TimesheetException
public void delete(IPersistent object,
java.lang.Class clazz)
throws TimesheetException
object - Description of Parameterclazz - Description of Parameter
TimesheetException
public void save(IPersistent object,
java.lang.Class clazz)
throws TimesheetException
object - Description of Parameterclazz - Description of Parameter
TimesheetException
public void update(IPersistent object,
java.lang.Class clazz)
throws TimesheetException
object - Description of Parameterclazz - Description of Parameter
TimesheetException - Description of Exception
public void shutdownDatabase()
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public net.sf.hibernate.Query createQuery(java.lang.String string)
throws TimesheetException
string -
TimesheetException - Description of Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||