CanonicalPath resourceTypePath = null; try { CanonicalPath tenant = CanonicalPath.of().tenant(parentPath.ids().getTenantId()).get(); resourceTypePath = Util.canonicalize(blueprint.getResourceTypePath(), tenant, parentPath, ResourceType.SEGMENT_TYPE);
if (parent == null) { if (context.entityClass == Tenant.class) { entityPath = CanonicalPath.of().tenant(id).get(); } else { throw new IllegalStateException("Could not find the parent of the entity to be created," +
.has(__cp.name(), CanonicalPath.of().tenant(tenantId).get().toString()) .hasLabel(Constants.Type.tenant.name()) .next();
CanonicalPath tenant = CanonicalPath.of().tenant(parentPath.ids().getTenantId()).get(); CanonicalPath metricTypePath = Util.canonicalize(blueprint.getMetricTypePath(), tenant, parentPath, MetricType.SEGMENT_TYPE);
@Override protected EntityAndPendingNotifications<BE, Tenant> wireUpNewEntity(BE entity, Tenant.Blueprint blueprint, CanonicalPath parentPath, BE parent, Transaction<BE> tx) { return new EntityAndPendingNotifications<>(entity, new Tenant(blueprint.getName(), CanonicalPath.of() .tenant(tx.extractId(entity)).get(), null, blueprint.getProperties()), emptyList()); }