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.api.localconfiguration; 014 015import org.nuxeo.ecm.core.api.CoreSession; 016import org.nuxeo.ecm.core.api.DetachedAdapter; 017import org.nuxeo.ecm.core.api.DocumentRef; 018 019/** 020 * Interface that must be implemented by other interface representing a local configuration. 021 * 022 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a> 023 * @since 5.4.2 024 */ 025public interface LocalConfiguration<T> extends DetachedAdapter { 026 027 /** 028 * Returns the related {@code DocumentRef} of this local configuration. 029 */ 030 DocumentRef getDocumentRef(); 031 032 /** 033 * Returns {@code true} if this {@code LocalConfiguration} accepted to be merged with a parent configuration, 034 * {@code false} otherwise. 035 */ 036 boolean canMerge(); 037 038 /** 039 * Merge this {@code LocalConfiguration} with another one. 040 */ 041 T merge(T other); 042 043 /** 044 * Save this LocalConfiguration. 045 * 046 * @since 5.5 047 */ 048 void save(CoreSession session); 049 050}