001    package org.kuali.student.common.ui.server.gwt;
002    
003    import java.util.List;
004    import java.util.Map;
005    
006    import org.kuali.student.common.assembly.data.Data;
007    import org.kuali.student.common.assembly.data.Metadata;
008    import org.kuali.student.common.exceptions.DataValidationErrorException;
009    import org.kuali.student.common.exceptions.DoesNotExistException;
010    import org.kuali.student.common.exceptions.InvalidParameterException;
011    import org.kuali.student.common.exceptions.MissingParameterException;
012    import org.kuali.student.common.exceptions.OperationFailedException;
013    import org.kuali.student.common.exceptions.VersionMismatchException;
014    import org.kuali.student.common.rice.authorization.PermissionType;
015    import org.kuali.student.common.ui.client.service.DataSaveResult;
016    import org.kuali.student.common.validation.dto.ValidationResultInfo;
017    
018    public interface DataService {
019            //Data operations
020            public Data getData(String dataId) throws OperationFailedException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
021            
022            public Metadata getMetadata(String id, Map<String, String> attributes) throws OperationFailedException;
023    
024            public DataSaveResult saveData(Data data) throws OperationFailedException, DataValidationErrorException, VersionMismatchException;
025            
026            public List<ValidationResultInfo> validateData(Data data) throws OperationFailedException;
027            
028            //AuthZ operations
029            public Boolean isAuthorized(PermissionType type, Map<String,String> attributes);
030    }