@Override public RootVertex<Node> getRootVertex() { return boot.meshRoot().getNodeRoot(); }
root.field(newElementField("tag", "Load tag by name or uuid.", (ac) -> boot.tagRoot(), TAG_TYPE_NAME)); root.field(newPagingSearchField("tags", "Load page of tags.", (ac) -> boot.tagRoot(), TAG_PAGE_TYPE_NAME, tagSearchHandler, null)); root.field(newPagingSearchField("tagFamilies", "Load page of tagFamilies.", (ac) -> boot.tagFamilyRoot(), TAG_FAMILY_PAGE_TYPE_NAME, tagFamilySearchHandler, null)); root.field(newElementField("schema", "Load schema by name or uuid.", (ac) -> boot.schemaContainerRoot(), SCHEMA_TYPE_NAME)); root.field(newPagingField("schemas", "Load page of schemas.", (ac) -> boot.schemaContainerRoot(), SCHEMA_PAGE_TYPE_NAME)); newElementField("microschema", "Load microschema by name or uuid.", (ac) -> boot.microschemaContainerRoot(), MICROSCHEMA_TYPE_NAME)); root.field(newPagingField("microschemas", "Load page of microschemas.", (ac) -> boot.microschemaContainerRoot(), MICROSCHEMA_PAGE_TYPE_NAME)); root.field(newElementField("role", "Load role by name or uuid.", (ac) -> boot.roleRoot(), ROLE_TYPE_NAME)); root.field(newPagingSearchField("roles", "Load page of roles.", (ac) -> boot.roleRoot(), ROLE_PAGE_TYPE_NAME, roleSearchHandler, RoleFilter.filter())); root.field(newElementField("group", "Load group by name or uuid.", (ac) -> boot.groupRoot(), GROUP_TYPE_NAME)); root.field(newPagingSearchField("groups", "Load page of groups.", (ac) -> boot.groupRoot(), GROUP_PAGE_TYPE_NAME, groupSearchHandler, GroupFilter.filter())); root.field(newElementField("user", "Load user by name or uuid.", (ac) -> boot.userRoot(), USER_TYPE_NAME)); root.field(newPagingSearchField("users", "Load page of users.", (ac) -> boot.userRoot(), USER_PAGE_TYPE_NAME, userSearchHandler, UserFilter.filter()));
try (Tx tx = db.tx()) { String userUuid = jwt.getString(USERID_FIELD_NAME); MeshAuthUser user = boot.userRoot().findMeshAuthUserByUuid(userUuid); if (user == null) { if (log.isDebugEnabled()) {
BootstrapInitializer boot = apiRouter.getRoot().getStorage().getBoot().get(); Database db = apiRouter.getRoot().getStorage().getDb().get(); Project project = db.tx(() -> boot.projectRoot().findByName(name)); if (project == null) { log.warn("Project for name {" + name + "} could not be found.");
Language language = boot.languageRoot().findByLanguageTag(languageTag); if (language== null) { log.warn("Could not find language {" + languageTag + "}");
if (uuid != null) { GraphQLContext gc = env.getContext(); Node node = boot.nodeRoot().findByUuid(uuid); if (node == null) {
MeshAuthUser user = boot.userRoot().findMeshAuthUserByUsername(username); if (user != null) { String accountPasswordHash = user.getPasswordHash();
for (Project project : boot.get().projectRoot().findAll()) { if (!projectsRouter.hasProjectRouter(project.getName())) { log.info("Mounting project {" + project.getName() + "}");
@Override public RootVertex<SchemaContainer> getRootVertex() { return boot.meshRoot().getSchemaContainerRoot(); }
UserRoot root = boot.userRoot(); MeshAuthUser user = root.findMeshAuthUserByUsername(username);
@Override public RootVertex<Role> getRootVertex() { return boot.meshRoot().getRoleRoot(); }
log.debug("Using anonymous user."); MeshAuthUser anonymousUser = db.tx(() -> boot.userRoot().findMeshAuthUserByUsername(ANONYMOUS_USERNAME)); if (anonymousUser == null) { if (log.isDebugEnabled()) {
@Override public RootVertex<MicroschemaContainer> getRootVertex() { return boot.meshRoot().getMicroschemaContainerRoot(); }
@Override public RootVertex<User> getRootVertex() { return boot.meshRoot().getUserRoot(); }
@Override public RootVertex<Group> getRootVertex() { return boot.meshRoot().getGroupRoot(); }
@Override public RootVertex<TagFamily> getRootVertex() { return boot.meshRoot().getTagFamilyRoot(); }
@Override public RootVertex<Tag> getRootVertex() { return boot.meshRoot().getTagRoot(); }
@Override public RootVertex<Project> getRootVertex() { return boot.meshRoot().getProjectRoot(); }
@Override public Set<String> filterUnknownIndices(Set<String> indices) { return db.tx(() -> { Set<String> activeIndices = new HashSet<>(); for (Project project : boot.meshRoot().getProjectRoot().findAll()) { activeIndices.add(TagFamily.composeIndexName(project.getUuid())); } return indices.stream() .filter(i -> i.startsWith(getType())) .filter(i -> !activeIndices.contains(i)) .collect(Collectors.toSet()); }); }