@Override
    public ContentTemplates getOrCreate() {
        // The user will never have any doc perms on the DRR as it is not an explorer doc, thus
        // access it via the proc user.
        return securityContext.asProcessingUserResult(() -> {
            // Should return 0-1 docs of our store's type, unless we have a problem
            final List<DocRef> docRefs = store.list();
            final DocRef docRef;
            if (NullSafe.isEmptyCollection(docRefs)) {
                // Not there so create it
                docRef = createDocument(DOC_NAME);
                LOGGER.info("Created document {}", docRef);
            } else {
                if (docRefs.size() > 1) {
                    throw new RuntimeException("Found multiple documents, expecting one. " + docRefs);
                } else {
                    docRef = Objects.requireNonNull(docRefs.getFirst());
                    if (!Objects.equals(DOC_NAME, docRef.getName())) {
                        throw new RuntimeException("Unexpected document " + docRef);
                    }
                }
            }
            return readDocument(docRef);
        });
    }
A bit of a special store that only ever holds one doc with a hard coded name.
stroom-core/src/main/java/stroom/core/receive/ContentTemplateStoreImpl.java