/** * @see org.apache.chemistry.opencmis.commons.impl.server.AbstractCmisService#getRepositoryInfos(org.apache.chemistry.opencmis.commons.data.ExtensionsData) */ @Override public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) { List<RepositoryInfo> result = new ArrayList<RepositoryInfo>(); for (I_CmsCmisRepository repository : OpenCms.getRepositoryManager().getRepositories( I_CmsCmisRepository.class)) { result.add(repository.getRepositoryInfo()); } return result; }
/** * Gets a repository by name, but only if its class is a subclass of the class passed as a parameter.<p> * Otherwise, null will be returned.<p> * * @param name the repository name * @param cls the class used to filter repositories * * @return the repository with the given name, or null */ @SuppressWarnings("unchecked") public <REPO extends I_CmsRepository> REPO getRepository(String name, Class<REPO> cls) { I_CmsRepository repo = getRepository(name); if (repo == null) { return null; } if (cls.isInstance(repo)) { return (REPO)repo; } else { return null; } }
/** * @see org.opencms.repository.A_CmsRepository#initConfiguration() */ @Override public void initConfiguration() throws CmsConfigurationException { CmsParameterConfiguration config = getConfiguration(); List<I_CmsResourceWrapper> wrapperObjects = CmsRepositoryManager.createResourceWrappersFromConfiguration( config, PARAM_WRAPPER, LOG); m_wrappers = Collections.unmodifiableList(wrapperObjects); super.initConfiguration(); }
if (m_repositoryManager.isConfigured()) { List repositories = m_repositoryManager.getRepositories(); if (repositories != null) {
m_repositoryManager = new CmsRepositoryManager(false);
m_repositoryManager.shutDown();
Map<String, Object> additionalInfosForRepositories = OpenCms.getRepositoryManager().getAdditionalInfoForLogin( newUser.getName(), password);
m_repositoryManager.initializeCms(adminCms);
if (m_repositoryManager.isConfigured()) { List<I_CmsRepository> repositories = m_repositoryManager.getRepositories(); if (repositories != null) {
m_repositoryManager = new CmsRepositoryManager(false);
/** * Gets the repository for a given repository id.<p> * * @param repositoryId the repository id * * @return the repository with the given id */ protected I_CmsCmisRepository getRepository(String repositoryId) { I_CmsCmisRepository result = OpenCms.getRepositoryManager().getRepository( repositoryId, I_CmsCmisRepository.class); if (result == null) { throw new CmisConnectionException("missing repository: " + repositoryId); } return result; }
/** * Initializes repositories using an admin CMS object.<p> * * @param cms the CMS object with admin privileges */ public void initializeCms(CmsObject cms) { List<String> toRemove = new ArrayList<String>(); // Repositories which can't be fully initialized need to be removed. for (I_CmsRepository repository : m_repositoryMap.values()) { String repoName = repository.getName(); try { repository.initializeCms(cms); } catch (CmsException e) { LOG.warn("Could not fully initialize repository " + repoName, e); toRemove.add(repoName); } } for (String removeRepo : toRemove) { m_repositoryMap.remove(removeRepo); } CmsJlanUsers.setAdminCms(cms); if (!getRepositories(CmsJlanRepository.class).isEmpty()) { m_jlanThreadManager.start(); } }
/** * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#initConfiguration() */ public void initConfiguration() throws CmsConfigurationException { List<I_CmsResourceWrapper> wrapperObjects = CmsRepositoryManager.createResourceWrappersFromConfiguration( getConfiguration(), PARAM_WRAPPER, LOG); m_wrappers = Collections.unmodifiableList(wrapperObjects); m_root = getConfiguration().getString(PARAM_ROOT, "").trim(); m_projectName = getConfiguration().getString(PARAM_PROJECT, "Offline").trim(); String addByteOrderMarkStr = getConfiguration().getString(PARAM_ADD_BOM, "" + true).trim(); String translationStr = getConfiguration().getString(PARAM_FILE_TRANSLATION, "" + true).trim(); m_addByteOrderMark = Boolean.parseBoolean(addByteOrderMarkStr); m_fileTranslation = Boolean.parseBoolean(translationStr); }
m_repository = OpenCms.getRepositoryManager().getRepository(repositoryName); if (m_repository == null) {
/** * @see org.alfresco.jlan.server.core.ShareMapper#getShareList(java.lang.String, org.alfresco.jlan.server.SrvSession, boolean) */ public SharedDeviceList getShareList(String host, SrvSession sess, boolean allShares) { SharedDeviceList shrList = new SharedDeviceList(); shrList.addShares(m_defaultMapper.getShareList(host, sess, allShares)); List<CmsJlanRepository> repos = OpenCms.getRepositoryManager().getRepositories(CmsJlanRepository.class); for (CmsJlanRepository repo : repos) { shrList.addShare(repo.getSharedDevice()); } return shrList; }
m_repository = OpenCms.getRepositoryManager().getRepository(repositoryName, A_CmsRepository.class); if (m_repository == null) {