Project

General

Profile

« Previous | Next » 

Revision 9301

Added by Jing Tao over 9 years ago

Use the key word "packages" to replace the "package".

View differences:

src/edu/ucsb/nceas/metacat/restservice/v1/MNResourceHandler.java
138 138
    protected static final String RESOURCE_META_CHANGED = "dirtySystemMetadata";
139 139
    protected static final String RESOURCE_GENERATE_ID = "generate";
140 140
    protected static final String RESOURCE_PUBLISH = "publish";
141
    protected static final String RESOURCE_PACKAGE = "package";
141
    protected static final String RESOURCE_PACKAGE = "packages";
142 142
    protected static final String RESOURCE_VIEWS = "views";
143 143
    protected static final String RESOURCE_TOKEN = "token";
144 144

  
......
448 448
	                    doViews(format, pid);
449 449
	                    status = true;
450 450
	                }
451
                } else {
452
                    throw new InvalidRequest("0000", "No resource matched for " + resource);
451 453
                } 
452 454
                
453 455
                if (!status) {
src/edu/ucsb/nceas/metacat/restservice/v2/MNResourceHandler.java
146 146
    protected static final String RESOURCE_META_CHANGED = "dirtySystemMetadata";
147 147
    protected static final String RESOURCE_GENERATE_ID = "generate";
148 148
    protected static final String RESOURCE_PUBLISH = "publish";
149
    protected static final String RESOURCE_PACKAGE = "package";
149
    protected static final String RESOURCE_PACKAGE = "packages";
150 150
    protected static final String RESOURCE_TOKEN = "token";
151 151
    protected static final String RESOURCE_WHOAMI = "whoami";
152 152

  
......
498 498
	                    doViews(format, pid);
499 499
	                    status = true;
500 500
	                }
501
                } 
501
                } else {
502
                    throw new InvalidRequest("0000", "No resource matched for " + resource);
503
                }
502 504
                
503 505
                if (!status) {
504 506
                	throw new ServiceFailure("0000", "Unknown error, status = " + status);

Also available in: Unified diff