public static boolean isValidGuid(AtlasObjectId objId) { return isValidGuid(objId.getGuid()); }
public static boolean isValidGuid(AtlasObjectId objId) { return isValidGuid(objId.getGuid()); }
private void recordObjectReference(AtlasObjectId objId) { if (AtlasTypeUtil.isValidGuid(objId)) { discoveryContext.addReferencedGuid(objId.getGuid()); } else { discoveryContext.addReferencedByUniqAttribs(objId); } } }
private void recordObjectReference(AtlasObjectId objId) { if (AtlasTypeUtil.isValidGuid(objId)) { discoveryContext.addReferencedGuid(objId.getGuid()); } else { discoveryContext.addReferencedByUniqAttribs(objId); } } }
AtlasVertex endVertex = AtlasGraphUtilsV2.findByGuid(guid); if (!AtlasTypeUtil.isValidGuid(guid) || endVertex == null) { throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, guid);
AtlasVertex endVertex = AtlasGraphUtilsV2.findByGuid(guid); if (!AtlasTypeUtil.isValidGuid(guid) || endVertex == null) { throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, guid);
private void validateAndNormalize(AtlasRelationship relationship) throws AtlasBaseException { List<String> messages = new ArrayList<>(); if (! AtlasTypeUtil.isValidGuid(relationship.getGuid())) { throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_GUID_NOT_FOUND, relationship.getGuid()); } AtlasRelationshipType type = typeRegistry.getRelationshipTypeByName(relationship.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, TypeCategory.RELATIONSHIP.name(), relationship.getTypeName()); } type.validateValue(relationship, relationship.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_CRUD_INVALID_PARAMS, messages); } type.getNormalizedValue(relationship); }
private void validateAndNormalize(AtlasRelationship relationship) throws AtlasBaseException { List<String> messages = new ArrayList<>(); if (! AtlasTypeUtil.isValidGuid(relationship.getGuid())) { throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_GUID_NOT_FOUND, relationship.getGuid()); } AtlasRelationshipType type = typeRegistry.getRelationshipTypeByName(relationship.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, TypeCategory.RELATIONSHIP.name(), relationship.getTypeName()); } type.validateValue(relationship, relationship.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_CRUD_INVALID_PARAMS, messages); } type.getNormalizedValue(relationship); }
@Override public void validateAndNormalizeForUpdate(AtlasEntity entity) throws AtlasBaseException { List<String> messages = new ArrayList<>(); if (! AtlasTypeUtil.isValidGuid(entity.getGuid())) { throw new AtlasBaseException(AtlasErrorCode.INVALID_OBJECT_ID, "invalid guid " + entity.getGuid()); } AtlasEntityType type = typeRegistry.getEntityTypeByName(entity.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, TypeCategory.ENTITY.name(), entity.getTypeName()); } type.validateValueForUpdate(entity, entity.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.INSTANCE_CRUD_INVALID_PARAMS, messages); } type.getNormalizedValueForUpdate(entity); }
@Override public void validateAndNormalize(AtlasEntity entity) throws AtlasBaseException { List<String> messages = new ArrayList<>(); if (! AtlasTypeUtil.isValidGuid(entity.getGuid())) { throw new AtlasBaseException(AtlasErrorCode.INVALID_OBJECT_ID, "invalid guid " + entity.getGuid()); } AtlasEntityType type = typeRegistry.getEntityTypeByName(entity.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, TypeCategory.ENTITY.name(), entity.getTypeName()); } type.validateValue(entity, entity.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.INSTANCE_CRUD_INVALID_PARAMS, messages); } type.getNormalizedValue(entity); }
@Override public void validateAndNormalize(AtlasEntity entity) throws AtlasBaseException { List<String> messages = new ArrayList<>(); if (! AtlasTypeUtil.isValidGuid(entity.getGuid())) { throw new AtlasBaseException(AtlasErrorCode.INVALID_OBJECT_ID, "invalid guid " + entity.getGuid()); } AtlasEntityType type = typeRegistry.getEntityTypeByName(entity.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, TypeCategory.ENTITY.name(), entity.getTypeName()); } type.validateValue(entity, entity.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.INSTANCE_CRUD_INVALID_PARAMS, messages); } type.getNormalizedValue(entity); }
@Override public void validateAndNormalizeForUpdate(AtlasEntity entity) throws AtlasBaseException { List<String> messages = new ArrayList<>(); if (! AtlasTypeUtil.isValidGuid(entity.getGuid())) { throw new AtlasBaseException(AtlasErrorCode.INVALID_OBJECT_ID, "invalid guid " + entity.getGuid()); } AtlasEntityType type = typeRegistry.getEntityTypeByName(entity.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, TypeCategory.ENTITY.name(), entity.getTypeName()); } type.validateValueForUpdate(entity, entity.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.INSTANCE_CRUD_INVALID_PARAMS, messages); } type.getNormalizedValueForUpdate(entity); }