001/* 002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Nuxeo - initial API and implementation 011 */ 012 013package org.nuxeo.ecm.core.management.api; 014 015import java.util.List; 016 017import org.nuxeo.ecm.core.management.statuses.AdministrableServiceDescriptor; 018 019public interface GlobalAdministrativeStatusManager { 020 021 /** 022 * Returns the identifier of the local Nuxeo Instance. 023 */ 024 String getLocalNuxeoInstanceIdentifier(); 025 026 /** 027 * Lists the identifiers of all Nuxeo Instances. 028 */ 029 List<String> listInstanceIds(); 030 031 /** 032 * Retrieve the {@link AdministrativeStatusManager} for a given Nuxeo instance. 033 */ 034 AdministrativeStatusManager getStatusManager(String instanceIdentifier); 035 036 /** 037 * Updates the status of a service for all registered Nuxeo instances. 038 */ 039 void setStatus(String serviceIdentifier, String state, String message, String login); 040 041 /** 042 * Lists services that are declared to be administrable. 043 */ 044 List<AdministrableServiceDescriptor> listRegistredServices(); 045 046 /** 047 * Gets the XMAP descriptor for one service. 048 */ 049 AdministrableServiceDescriptor getServiceDescriptor(String serviceIdentifier); 050 051 /** 052 * Registers a service given its descriptor. 053 */ 054 void registerService(AdministrableServiceDescriptor desc); 055 056}