1 package org.kuali.student.common.ui.server.gwt;
2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.kuali.student.common.ui.client.service.DataSaveResult;
7 import org.kuali.student.r1.common.assembly.data.Data;
8 import org.kuali.student.r1.common.assembly.data.Metadata;
9
10 import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
11 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
12 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
13 import org.kuali.student.r2.common.exceptions.MissingParameterException;
14 import org.kuali.student.r2.common.exceptions.OperationFailedException;
15 import org.kuali.student.r2.common.exceptions.VersionMismatchException;
16 import org.kuali.student.r1.common.rice.authorization.PermissionType;
17 import org.kuali.student.r2.common.dto.ValidationResultInfo;
18 import org.kuali.student.r2.common.dto.ContextInfo;
19
20 public interface DataService {
21
22 public Data getData(String dataId, ContextInfo contextInfo) throws OperationFailedException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
23
24 public Metadata getMetadata(String id, Map<String, String> attributes, ContextInfo contextInfo) throws OperationFailedException;
25
26 public DataSaveResult saveData(Data data, ContextInfo contextInfo) throws OperationFailedException, DataValidationErrorException, VersionMismatchException;
27
28 public List<ValidationResultInfo> validateData(Data data, ContextInfo contextInfo) throws OperationFailedException;
29
30
31 public Boolean isAuthorized(PermissionType type, Map<String,String> attributes, ContextInfo contextInfo);
32 }