/** * Obtains the JCR version supported by this repository. This is a JBoss managed readonly * property. * * @param repositoryName (never <code>null</code>) * @return String version (never <code>null</code>) */ @ManagementOperation( description = "The JCR version supported by this repository", impact = Impact.ReadOnly) public String getRepositoryVersion(String repositoryName) { String version = null; JcrRepository repository = getRepository(repositoryName); if (repository != null) { version = repository.getDescriptor(Repository.SPEC_NAME_DESC) + " " + repository.getDescriptor(Repository.SPEC_VERSION_DESC); } return version; }
/** * Obtains the managed sequencing service. This is a JBoss managed operation. * * @param repositoryName * @return the sequencing service or <code>null</code> if never started */ @ManagementOperation( description = "Obtains the descriptors for a JCRRepository as ManagedProperties", impact = Impact.ReadOnly) public List<ManagedProperty> getRepositoryProperties(String repositoryName) { if (!isRunning()) return null; List<ManagedProperty> propertyList = new ArrayList<ManagedProperty>(); JcrRepository repository = getRepository(repositoryName); String[] descriptorKeys = repository.getDescriptorKeys(); for (String key : descriptorKeys) { String value = repository.getDescriptor(key); propertyList.add(new ManagedProperty(ManagedUtils.createLabel(key), value)); } return propertyList; }