001/*
002 * ModeShape (http://www.modeshape.org)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *       http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.modeshape.cmis;
017
018import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
019import org.apache.chemistry.opencmis.commons.impl.dataobjects.RepositoryInfoImpl;
020
021/**
022 * This class overrides identifier of the repository. To be able to manipulate with multiple repositories this class changes the
023 * repository identifier to follow composite naming rules.
024 * 
025 * @author kulikov
026 */
027public class RepositoryInfoLocal extends RepositoryInfoImpl {
028    private static final long serialVersionUID = 1L;
029    private String id;
030
031    /**
032     * Creates new data object.
033     * 
034     * @param id the new repository identifier.
035     * @param info the original repository info object
036     */
037    public RepositoryInfoLocal( String id,
038                                RepositoryInfo info ) {
039        super(info);
040        this.id = id;
041    }
042
043    @Override
044    public String getId() {
045        return id;
046    }
047}