/** * it is allowed that user can register their own entity * * @param clazz entity class * @throws IllegalArgumentException */ public static void registerEntity(Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException { registerEntity(createEntityDefinition(clazz)); }
/** * it is allowed that user can register their own entity * @param clazz entity class * @throws IllegalArgumentException */ public static void registerEntity(Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException{ registerEntity(createEntityDefinition(clazz)); }
/** * it is allowed that user can register their own entity * @deprecated This API is deprecated since we need to use Service annotation to define service name for entities * @param serviceName entity service name * @param clazz entity class * @throws IllegalArgumentException * */ @Deprecated public static void registerEntity(String serviceName, Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException{ registerEntity(serviceName, createEntityDefinition(clazz)); }
/** * it is allowed that user can register their own entity * * @deprecated This API is deprecated since we need to use Service annotation to define service name for * entities * @param serviceName entity service name * @param clazz entity class * @throws IllegalArgumentException */ @Deprecated public static void registerEntity(String serviceName, Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException { registerEntity(serviceName, createEntityDefinition(clazz)); }
@Test public void testCreateMetricEntityDefinition() { EntityDefinition entityDefinition = EntityDefinitionManager .createEntityDefinition(GenericMetricEntity.class); Assert.assertNotNull(entityDefinition); } }
@Test public void testCreateEntityDefinition() { EntityDefinition entityDefinition = EntityDefinitionManager .createEntityDefinition(TestLogAPIEntity.class); Assert.assertNotNull(entityDefinition); }