All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.modeshape.jcr.spi.federation.package-info Maven / Gradle / Ivy

There is a newer version: 5.4.1.Final
Show newest version
/*
 * ModeShape (http://www.modeshape.org)
 *
 * 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.
 */
/**
 * This package provides a Service Provider Interface (SPI) for connectors to external systems. The ModeShape federation system
 * uses these {@link org.modeshape.jcr.spi.federation.Connector} implementations to enable a repository to access external systems
 * and project the external information as structured nodes within the repository. External sources are configured in the 
 * {@link org.modeshape.jcr.RepositoryConfiguration repository configuration JSON file} to use a specific 
 * {@link org.modeshape.jcr.spi.federation.Connector} implementation (including connector-specific configuration properties),
 * while the projections that define how and where the external content is bound into the repository content are created using the 
 * {@link org.modeshape.jcr.api.federation.FederationManager}:
 * 
 * javax.jcr.Session jcrSession = ...
 * Session session = (org.modeshape.jcr.api.Session)jcrSession;
 * FederationManager fedMgr = session.getWorkspace().getFederationManager();
 * 
 * javax.jcr.Node parentNode = ... // the parent of the federated content
 * String parentPath = parentNode.getPath();
 * String sourceName = ... // the name of the external source
 * String externalPath = ... // the path of the node in the external source that is to appear as a child of 'parentNode'
 * String alias = ... // Optional alias for the external node
 * fedMgr.createExternalProjection(parentPath, sourceName, externalPath, alias);
 * 
*

* To create a custom connector, simply create a {@link org.modeshape.jcr.spi.federation.Connector} subclass * and implement the necessary methods. If your connector is only to read information and never will update any external content, * you can instead subclass the {@link org.modeshape.jcr.spi.federation.ReadOnlyConnector} class, which implements the methods * used to create/update/delete content by throwing the proper exception. *

*/ package org.modeshape.jcr.spi.federation;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy