com.formkiq.server.service.FormService Maven / Gradle / Ivy
package com.formkiq.server.service;
import java.io.IOException;
import org.springframework.security.core.userdetails.UserDetails;
import com.formkiq.server.domain.type.ClientFormType;
import com.formkiq.server.domain.type.FormDTO;
import com.formkiq.server.domain.type.FormListDTO;
import com.formkiq.server.domain.type.SyncListDTO;
import com.formkiq.server.domain.type.WorkflowListDTO;
/**
* FormService.
*
*/
public interface FormService {
/**
* Delete ClientForm.
* @param type {@link ClientFormType}
* @param client {@link String}
* @param uuid {@link String}
*/
void deleteClientForm(ClientFormType type, String client, String uuid);
/**
* Finds Form for user.
* @param user {@link UserDetails}
* @param client {@link String}
* @param form {@link String}
* @return {@link FormDTO}
*/
FormDTO findForm(UserDetails user, String client, String form);
/**
* Gets Client Form Data.
* @param client {@link String}
* @param uuid {@link String}
* @return byte[]
* @throws IOException IOException
*/
byte[] findFormData(final String client, final String uuid)
throws IOException;
/**
* Find Forms for a client.
* @param client {@link String}
* @param token {@link String}
* @return {@link FormListDTO}
*/
FormListDTO findForms(String client, String token);
/**
* Find Forms for a client.
* @param client {@link String}
* @param form {@link String}
* @param token {@link String}
* @return {@link FormListDTO}
*/
FormListDTO findForms(String client, String form, String token);
/**
* Find Workflow.
* @param user {@link UserDetails}
* @param client {@link String}
* @param workflow {@link String}
* @return {@link FormDTO}
*/
FormDTO findWorkflow(UserDetails user, String client, String workflow);
/**
* Find Workflows.
* @param client {@link String}
* @param token {@link String}
* @return {@link WorkflowListDTO}
*/
WorkflowListDTO findWorkflows(String client, String token);
/**
* Find Workflows.
* @param client {@link String}
* @param workflow {@link String}
* @param token {@link String}
* @return {@link WorkflowListDTO}
*/
WorkflowListDTO findWorkflows(String client, String workflow, String token);
/**
* Returns Sync List for User.
* @param user {@link UserDetails}
* @param client {@link String}
* @param nextToken {@link String}
* @return {@link SyncListDTO}
*/
SyncListDTO getSyncList(UserDetails user, String client,
String nextToken);
/**
* Get Workflow Sync List.
* @param user {@link UserDetails}
* @param client {@link String}
* @param next {@link String}
* @return {@link SyncListDTO}
*/
SyncListDTO getSyncWorkflowList(UserDetails user, String client,
String next);
/**
* Save Form.
* @param user {@link UserDetails}
* @param client {@link String}
* @param bytes byte[]
* @return {@link String}
*/
String saveForm(UserDetails user, String client, byte[] bytes);
/**
* Saves Workflow.
* @param user {@link UserDetails}
* @param client {@link String}
* @param bytes byte[]
* @return {@link String}
*/
String saveWorkflow(UserDetails user, String client,
byte[] bytes);
}