SlideRepository.java :  » Content-Management-System » hippo » nl » hippo » slide » repository » Java Open Source

Java Open Source » Content Management System » hippo 
hippo » nl » hippo » slide » repository » SlideRepository.java
/*
 * Copyright 2005 Hippo Webworks.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.hippo.slide.repository;

import nl.hippo.slide.index.LuceneIndexer;
import nl.hippo.slide.replication.ReplicatorCollection;

import org.apache.slide.common.Namespace;
import org.apache.slide.common.NamespaceAccessToken;


/**
 * Slide repository component represents a Slide domain and
 * manages Slide namespace access.
 *
 * @author <a href="mailto:unico@hippo.nl">Unico Hommes</a>
 */
public interface SlideRepository {

    public String ROLE = SlideRepository.class.getName();

    public void reloadNamespace(String namespaceName);
    public void clearCachesOfNamespace(String namespaceName);
    public void reloadAllNamespaces();

    /**
     * Get a Slide namespace by name. Null if not present.
     *
     * @param namespaceName
     */
    public NamespaceAccessToken getNamespaceToken(String namespaceName);

    /**
     * Get an avalon configuration by namespace name.
     *
     * @param namespaceName
     */
    public ReplicatorCollection getReplicator(String namespaceName);

    /**
     * Get the LuceneIndexer for a particular namespace.
     *
     * @param namespaceName
     */
    public LuceneIndexer getLuceneIndexer(String namespaceName);

    /**
     * Get all namespace tokens in the domain.
     */
    public NamespaceAccessToken[] getNamespaceTokens();

    /**
     * Access all Namespaces in the domain.
     */
    public Namespace[] getNamespaces();

    /**
     * Register a {@link RepositoryListener}
     */
    public void registerRepositoryListener(RepositoryListener listener);

    /**
     * Unregister a {@link RepositoryListener}
     */
    public void unregisterRepositoryListener(RepositoryListener listener);

}

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.