|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.formsonline.model.FormsOnlineDAOJdbc
public class FormsOnlineDAOJdbc
Constructor Summary | |
---|---|
FormsOnlineDAOJdbc()
|
Method Summary | |
---|---|
FormDetail |
createForm(FormDetail formDetail)
Save new form in database |
FormInstance |
createInstance(FormInstance instance)
|
FormDetail |
deleteForm(FormPK pk)
Delete Form from database |
void |
deleteRequest(RequestPK pk)
|
List<FormDetail> |
findAllForms(String instanceId)
Get all forms that has been created in given instance |
List<String> |
getAvailableFormIdsAsReceiver(String instanceId,
String userId,
String[] userGroupIds)
|
protected Connection |
getConnection()
Get a new connection. |
FormDetail |
getForm(FormPK pk)
Load forms from database with given instance Id and form id |
List<FormDetail> |
getForms(List<String> formIds)
|
List<FormInstance> |
getReceivedRequests(FormPK pk,
boolean allRequests,
String userId)
Get all requests associated to given form. |
List<String> |
getReceiversAsGroups(FormPK pk)
Get the form's receivers list where groups has been declared directly. |
List<String> |
getReceiversAsUsers(FormPK pk)
Get the form's receivers list where users has been declared directly. |
FormInstance |
getRequest(RequestPK pk)
|
List<String> |
getSendersAsGroups(FormPK pk)
Get the form's senders list where groups has been declared directly. |
List<String> |
getSendersAsUsers(FormPK pk)
Get the form's senders list where users has been declared directly. |
List<FormInstance> |
getSentFormInstances(FormPK pk,
String userId)
Get all form instances that have been sent by given user (excepted the ones that have been archived. |
List<FormDetail> |
getUserAvailableForms(String instanceId,
String userId,
String[] userGroupIds)
Get the form available to be sent for given user or given groups |
void |
updateForm(FormDetail formDetail)
Update form in database |
void |
updateReceivers(FormPK pk,
String[] newUserReceiverIds,
String[] newGroupReceiverIds)
Update form receivers list. |
void |
updateRequest(FormInstance formInstance)
|
void |
updateSenders(FormPK pk,
String[] newUserSenderIds,
String[] newGroupSenderIds)
Update form senders list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormsOnlineDAOJdbc()
Method Detail |
---|
public FormDetail createForm(FormDetail formDetail) throws FormsOnlineDatabaseException
FormsOnlineDAO
createForm
in interface FormsOnlineDAO
formDetail
- the form detail
FormsOnlineDatabaseException
public FormDetail deleteForm(FormPK pk) throws FormsOnlineDatabaseException
FormsOnlineDAO
deleteForm
in interface FormsOnlineDAO
pk
- the pk of form to be deleted
FormsOnlineDatabaseException
public FormDetail getForm(FormPK pk) throws FormsOnlineDatabaseException
FormsOnlineDAO
getForm
in interface FormsOnlineDAO
pk
- the form primary key
FormsOnlineDatabaseException
public List<FormDetail> findAllForms(String instanceId) throws FormsOnlineDatabaseException
FormsOnlineDAO
findAllForms
in interface FormsOnlineDAO
instanceId
- the instance id
FormsOnlineDatabaseException
public void updateForm(FormDetail formDetail) throws FormsOnlineDatabaseException
FormsOnlineDAO
updateForm
in interface FormsOnlineDAO
formDetail
- the form detail
FormsOnlineDatabaseException
public List<String> getReceiversAsGroups(FormPK pk) throws FormsOnlineDatabaseException
FormsOnlineDAO
getReceiversAsGroups
in interface FormsOnlineDAO
pk
- the form primary key
FormsOnlineDatabaseException
public List<String> getReceiversAsUsers(FormPK pk) throws FormsOnlineDatabaseException
FormsOnlineDAO
getReceiversAsUsers
in interface FormsOnlineDAO
pk
- the form primary key
FormsOnlineDatabaseException
public List<String> getSendersAsGroups(FormPK pk) throws FormsOnlineDatabaseException
FormsOnlineDAO
getSendersAsGroups
in interface FormsOnlineDAO
pk
- the form primary key
FormsOnlineDatabaseException
public List<String> getSendersAsUsers(FormPK pk) throws FormsOnlineDatabaseException
FormsOnlineDAO
getSendersAsUsers
in interface FormsOnlineDAO
pk
- the form primary key
FormsOnlineDatabaseException
public void updateReceivers(FormPK pk, String[] newUserReceiverIds, String[] newGroupReceiverIds) throws FormsOnlineDatabaseException
FormsOnlineDAO
updateReceivers
in interface FormsOnlineDAO
pk
- the form primary keynewUserReceiverIds
- the new receivers list as user idsnewGroupReceiverIds
- the new receivers list as group ids
FormsOnlineDatabaseException
public void updateSenders(FormPK pk, String[] newUserSenderIds, String[] newGroupSenderIds) throws FormsOnlineDatabaseException
FormsOnlineDAO
updateSenders
in interface FormsOnlineDAO
pk
- the form primary keynewUserSenderIds
- the new sender list as user idsnewGroupSenderIds
- the new sender list as group ids
FormsOnlineDatabaseException
public List<FormDetail> getUserAvailableForms(String instanceId, String userId, String[] userGroupIds) throws FormsOnlineDatabaseException
FormsOnlineDAO
getUserAvailableForms
in interface FormsOnlineDAO
instanceId
- the component instance iduserId
- the user iduserGroupIds
- the user's groups id list
FormsOnlineDatabaseException
public List<FormDetail> getForms(List<String> formIds) throws FormsOnlineDatabaseException
getForms
in interface FormsOnlineDAO
FormsOnlineDatabaseException
public List<FormInstance> getSentFormInstances(FormPK pk, String userId) throws FormsOnlineDatabaseException
FormsOnlineDAO
getSentFormInstances
in interface FormsOnlineDAO
pk
- the form primary keyuserId
- the user id
FormsOnlineDatabaseException
public List<FormInstance> getReceivedRequests(FormPK pk, boolean allRequests, String userId) throws FormsOnlineDatabaseException
FormsOnlineDAO
getReceivedRequests
in interface FormsOnlineDAO
pk
- the form primary keyuserId
- the user id
FormsOnlineDatabaseException
public List<String> getAvailableFormIdsAsReceiver(String instanceId, String userId, String[] userGroupIds) throws FormsOnlineDatabaseException
getAvailableFormIdsAsReceiver
in interface FormsOnlineDAO
FormsOnlineDatabaseException
public FormInstance createInstance(FormInstance instance) throws FormsOnlineDatabaseException
createInstance
in interface FormsOnlineDAO
FormsOnlineDatabaseException
public FormInstance getRequest(RequestPK pk) throws FormsOnlineDatabaseException
getRequest
in interface FormsOnlineDAO
FormsOnlineDatabaseException
public void updateRequest(FormInstance formInstance) throws FormsOnlineDatabaseException
updateRequest
in interface FormsOnlineDAO
FormsOnlineDatabaseException
public void deleteRequest(RequestPK pk) throws FormsOnlineDatabaseException
deleteRequest
in interface FormsOnlineDAO
FormsOnlineDatabaseException
protected Connection getConnection() throws FormsOnlineDatabaseException
FormsOnlineDatabaseException
- if a database error occured while getting connection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |