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.storage; 014 015import java.util.List; 016 017import org.nuxeo.ecm.core.management.api.AdministrativeStatus; 018 019public interface AdministrativeStatusPersister { 020 021 /** 022 * Lists all instance identifiers persisted in the backend. 023 */ 024 List<String> getAllInstanceIds(); 025 026 /** 027 * Saves the {@link AdministrativeStatus} of a service of a given instance 028 */ 029 AdministrativeStatus saveStatus(AdministrativeStatus status); 030 031 /** 032 * Reads the {@link AdministrativeStatus} of a service for a given instance 033 */ 034 AdministrativeStatus getStatus(String instanceId, String serviceIdentifier); 035 036 /** 037 * Retrieves the {@link AdministrativeStatus} for all services of a given instance 038 */ 039 List<AdministrativeStatus> getAllStatuses(String instanceId); 040 041 /** 042 * Removes all persisted states for a given instance. 043 */ 044 void remove(String instanceId); 045 046}