Project

General

Profile

« Previous | Next » 

Revision 5648

Added by berkley over 13 years ago

implemented crud.describe

View differences:

CrudService.java
896 896
    }
897 897

  
898 898
    /**
899
     * describe a document.  NOT IMPLEMENTED
899
     * describe a document.  
900 900
     */
901 901
    public DescribeResponse describe(AuthToken token, Identifier guid)
902 902
            throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, 
903
            NotImplemented {
903
            NotImplemented, InvalidRequest {
904 904
        logCrud.info("describe");
905
        throw new NotImplemented("1361", "This method not yet implemented.");
905
        
906
        if(token == null)
907
        {
908
            throw new InvalidToken("1370", "Authentication token is null");
909
        }
910
        
911
        if(guid == null || guid.getValue().trim().equals(""))
912
        {
913
            throw new InvalidRequest("1362", "Guid is null.  A valid guid is required.");
914
        }
915
        
916
        SystemMetadata sm = getSystemMetadata(token, guid);
917
        DescribeResponse dr = new DescribeResponse(sm.getObjectFormat(), 
918
                sm.getSize(), sm.getDateSysMetadataModified(), sm.getChecksum());
919
        return dr;
906 920
    }
907 921
    
908 922
    /**

Also available in: Unified diff