82 |
82 |
import org.dataone.service.types.ObjectFormatList;
|
83 |
83 |
import org.dataone.service.types.ObjectList;
|
84 |
84 |
import org.dataone.service.types.Service;
|
85 |
|
import org.dataone.service.types.ServiceMethod;
|
86 |
85 |
import org.dataone.service.types.Services;
|
87 |
86 |
import org.dataone.service.types.Session;
|
88 |
87 |
import org.dataone.service.types.SystemMetadata;
|
... | ... | |
864 |
863 |
mnAuthorization07.setName("Metacat MN_Authorization Version 0.7");
|
865 |
864 |
mnAuthorization07.setVersion("0.7");
|
866 |
865 |
|
867 |
|
//name, rest, implemented
|
868 |
|
mnCrud03.addMethod(getServiceMethod("MN_crud.get()", "/object/<guid>", true));
|
869 |
|
mnCrud03.addMethod(getServiceMethod("MN_crud.getSystemMetadata()", "/meta/<guid>", true));
|
870 |
|
mnCrud04.addMethod(getServiceMethod("MN_crud.create()", "/object/<guid>", true));
|
871 |
|
mnCrud04.addMethod(getServiceMethod("MN_crud.update()", "/object/<guid>", true));
|
872 |
|
mnCrud09.addMethod(getServiceMethod("MN_crud.delete()", "/object/<guid>", true));
|
873 |
|
mnCrud03.addMethod(getServiceMethod("MN_crud.describe()", "/object/<guid>", true));
|
874 |
|
mnCrud03.addMethod(getServiceMethod("MN_crud.getChecksum()", "/checksum/<guid>", true));
|
875 |
|
mnCrud03.addMethod(getServiceMethod("MN_crud.getLogRecords()", "/log", true));
|
876 |
|
mnReplication03.addMethod(getServiceMethod("MN_replication.listObjects()", "/object", true));
|
877 |
|
mnReplication03.addMethod(getServiceMethod("MN_replication.replicate()", "/object", true));
|
878 |
|
mnHealth04.addMethod(getServiceMethod("MN_health.ping()", "/health/ping", false));
|
879 |
|
mnHealth04.addMethod(getServiceMethod("MN_health.getObjectStatistics()", "/monitor/object/<guid>", false));
|
880 |
|
mnHealth06.addMethod(getServiceMethod("MN_health.getStatus()", "/health/status", false));
|
881 |
|
mnAuthentication07.addMethod(getServiceMethod("MN_authentication.login()", "/account/login", false));
|
882 |
|
mnAuthentication07.addMethod(getServiceMethod("MN_authentication.logout()", "/account/logout", false));
|
883 |
|
mnAuthorization07.addMethod(getServiceMethod("MN_authorization.isAuthorized()", "/isAuthorized/<guid>", false));
|
884 |
|
|
885 |
866 |
Services ss = new Services();
|
886 |
867 |
ss.addService(mnCrud03);
|
887 |
868 |
ss.addService(mnCrud04);
|
... | ... | |
2039 |
2020 |
+ e1.getMessage());
|
2040 |
2021 |
}
|
2041 |
2022 |
}
|
2042 |
|
|
2043 |
|
/**
|
2044 |
|
* create a new ServiceMethod declaration
|
2045 |
|
* @param name
|
2046 |
|
* @param rest
|
2047 |
|
* @param implemented
|
2048 |
|
* @return
|
2049 |
|
*/
|
2050 |
|
private ServiceMethod getServiceMethod(String name, String rest, boolean implemented)
|
2051 |
|
{
|
2052 |
|
ServiceMethod sm = new ServiceMethod();
|
2053 |
|
sm.setImplemented(implemented);
|
2054 |
|
sm.setName(name);
|
2055 |
|
sm.setRest(rest);
|
2056 |
|
return sm;
|
2057 |
|
}
|
2058 |
2023 |
|
|
2024 |
|
2059 |
2025 |
/**
|
2060 |
2026 |
* List the object formats registered with the system
|
2061 |
2027 |
*/
|
include latest D1 common/lib changes