* @param context
* the request context
* @return the GETCLIENTSERVICES axl
*/
private String getClientServices(RequestContext context) {
ImsCatalog catalog = context.getCatalogConfiguration().getArcImsCatalog();
AuthenticationStatus authStatus = context.getUser().getAuthenticationStatus();
boolean bIsAdministrator = authStatus.getAuthenticatedRoles().hasRole(
"gptAdministrator");
boolean bIsPublisher = authStatus.getAuthenticatedRoles().hasRole(
"gptPublisher");
StringBuffer sb = new StringBuffer();
sb.append("<ARCXML version=\"1.0\">\n");
sb.append("<RESPONSE><SERVICES>");
String sService = catalog.getBrowseService().getServiceName();
if (sService.length() > 0) {
String sRole = "metadata_browser_all";
sb.append("<SERVICE ACCESS=\"PUBLIC\" DESC=\"\"");
sb.append(" NAME=\"").append(sService).append("\"");
sb.append(" SERVICEGROUP=\"MetadataServer1\" STATUS=\"ENABLED\"");
sb.append(" roles=\"").append(sRole).append("\"");
sb.append(" TYPE=\"MetadataServer\" VERSION=\"\" group=\"*\">");
sb.append("<IMAGE TYPE=\"xml,gnd,jpg\"/>");
sb
.append("<ENVIRONMENT><LOCALE country=\"US\" language=\"en\" variant=\"\"/><UIFONT name=\"Arial\"/></ENVIRONMENT>");
sb.append("<CLEANUP INTERVAL=\"10\"/>");
sb.append("</SERVICE>");
}
sService = catalog.getPublishService().getServiceName();
if ((sService.length() > 0) && (bIsAdministrator || bIsPublisher)) {
String sRole = ImsPermissionDao.ROLE_PUBLISHER;
if (bIsAdministrator)
sRole = ImsPermissionDao.ROLE_ADMINISTRATOR;
sb.append("<SERVICE ACCESS=\"PUBLIC\" DESC=\"\"");