public ValueMap getState()

in src/main/java/org/apache/sling/sitemap/impl/SitemapStorage.java [161:182]


    public ValueMap getState(@NotNull Resource sitemapRoot, @NotNull String name) throws IOException {
        String statePath = getSitemapFilePath(sitemapRoot, name) + STATE_EXTENSION;
        try (ResourceResolver resolver = resourceResolverFactory.getServiceResourceResolver(AUTH)) {
            Resource state = resolver.getResource(statePath);

            if (state == null) {
                checkpointMisses.increment();
                return ValueMap.EMPTY;
            }

            if (isExpired(state)) {
                checkpointReadsExpired.increment();
                return ValueMap.EMPTY;
            }

            // make a copy to read properties fully
            checkpointReads.increment();
            return new ValueMapDecorator(new HashMap<>(state.getValueMap()));
        } catch (LoginException ex) {
            throw new IOException("Cannot read state at " + statePath, ex);
        }
    }