service-registry/src/main/java/de/evoila/osb/service/registry/manager/BasicManager.java
public Optional<T> add(T t) {
        if (exists(t.getId()))
            return Optional.<T>empty();
        return Optional.<T>of(repository.save(t));
    }
/**
     * Adds an object of the type T to the storage, if non already exists with the same id.
     *
     * @param t object of type T to add to the storage, its id will be used for the existence check
     * @return An empty {@linkplain Optional} if there is already an object with the same id or an {@linkplain Optional} with the updated saved object.
     */
Adds an object of the type T to the storage, if non already exists with the same id.
@param t object of type T to add to the storage, its id will be used for the existence check
@return An empty  Optional if there is already an object with the same id or an  Optional with the updated saved object.
Adds an object of the type T to the storage if non already exists with the same id . @param t object of type T to add to the storage its id will be used for the existence check @return An empty Optional if there is already an object with the same id or an Optional with the updated saved object .
public Optional<T> add(T t) {
        if (exists(t.getId()))
            return Optional.<T>empty();
        return Optional.<T>of(repository.save(t));
    }
public Optional < T > add ( T t ) { if ( exists ( t . getId ( ) ) ) return Optional . < T > empty ( ) ; return Optional . < T > of ( repository . save ( t ) ) ; }
Adds an object of the type T to the storage, if non already exists with the same id.
Adds an object of the type T to the storage if non already exists with the same id .