@Override public boolean isRegistered(String typeName) throws AtlasException { return transientTypes.containsKey(typeName) || TypeSystem.this.isRegistered(typeName); }
@Override public boolean isRegistered(String typeName) throws AtlasException { return transientTypes.containsKey(typeName) || TypeSystem.this.isRegistered(typeName); }
public EnumType defineEnumType(EnumTypeDefinition eDef) throws AtlasException { assert eDef.name != null; if (isRegistered(eDef.name)) { throw new AtlasException(String.format("Redefinition of type %s not supported", eDef.name)); } EnumType eT = new EnumType(this, eDef.name, eDef.description, eDef.version, eDef.enumValues); typeCache.put(eT); return eT; }
public EnumType defineEnumType(EnumTypeDefinition eDef) throws AtlasException { assert eDef.name != null; if (isRegistered(eDef.name)) { throw new AtlasException(String.format("Redefinition of type %s not supported", eDef.name)); } EnumType eT = new EnumType(this, eDef.name, eDef.description, eDef.version, eDef.enumValues); typeCache.put(eT); return eT; }
assert eDef.name != null; if (!update) { if (TypeSystem.this.isRegistered(eDef.name)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", eDef.name)); } else if (transientTypes.containsKey(eDef.name)) { assert sDef.typeName != null; if (!update) { if (TypeSystem.this.isRegistered(sDef.typeName)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", sDef.typeName)); } else if (transientTypes.containsKey(sDef.typeName)) { assert traitDef.typeName != null; if (!update) { if (TypeSystem.this.isRegistered(traitDef.typeName)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", traitDef.typeName)); } else if (transientTypes.containsKey(traitDef.typeName)) { assert classDef.typeName != null; if (!update) { if (TypeSystem.this.isRegistered(classDef.typeName)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", classDef.typeName)); } else if (transientTypes.containsKey(classDef.typeName)) {
assert eDef.name != null; if (!update) { if (TypeSystem.this.isRegistered(eDef.name)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", eDef.name)); } else if (transientTypes.containsKey(eDef.name)) { assert sDef.typeName != null; if (!update) { if (TypeSystem.this.isRegistered(sDef.typeName)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", sDef.typeName)); } else if (transientTypes.containsKey(sDef.typeName)) { assert traitDef.typeName != null; if (!update) { if (TypeSystem.this.isRegistered(traitDef.typeName)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", traitDef.typeName)); } else if (transientTypes.containsKey(traitDef.typeName)) { assert classDef.typeName != null; if (!update) { if (TypeSystem.this.isRegistered(classDef.typeName)) { throw new TypeExistsException(String.format("Redefinition of type %s is not supported", classDef.typeName)); } else if (transientTypes.containsKey(classDef.typeName)) {
@Test public void testIsRegistered() throws Exception { getTypeSystem().defineEnumType("enum_test", new EnumValue("0", 0), new EnumValue("1", 1), new EnumValue("2", 2), new EnumValue("3", 3)); assertTrue(getTypeSystem().isRegistered("enum_test")); }
@Test public void testIsRegistered() throws Exception { getTypeSystem().defineEnumType("enum_test", new EnumValue("0", 0), new EnumValue("1", 1), new EnumValue("2", 2), new EnumValue("3", 3)); assertTrue(getTypeSystem().isRegistered("enum_test")); }