@Override
public RepositoryObject createRepositoryObject(String entityType, Map<String, String> attributes,
Map<String, String> tags) throws IllegalArgumentException {
if (TARGET.equals(entityType)) {
ObjectRepository<StatefulTargetObject> repo = getGenericObjectRepository(TARGET);
StatefulTargetRepository statefulRepo = (StatefulTargetRepository) repo;
return statefulRepo.preregister(attributes, tags);
}
else {
prepareAssociationAttributes(entityType, attributes);
ObjectRepository<?> repo = getGenericObjectRepository(entityType);
return repo.create(attributes, tags);