001package org.intellimate.izou.identification; 002 003import java.util.Optional; 004 005/** 006 * @author Leander Kurscheidt 007 * @version 1.0 008 */ 009public interface IdentificationManagerM { 010 /** 011 * If you have registered with an Identifiable interface, you can receive Identification Instances with this method. 012 * @param identifiable the registered Identifiable 013 * @return an Identification Instance or null if not registered 014 */ 015 Optional<Identification> getIdentification(Identifiable identifiable); 016 017 /** 018 * If a class has registered with an Identifiable interface you can receive an Identification Instance describing 019 * the class by providing his ID. 020 * @param id the ID of the registered Identifiable 021 * @return an Identification Instance or null if not registered 022 */ 023 Optional<Identification> getIdentification(String id); 024 025 /** 026 * Registers an Identifiable, ID has to be unique. 027 * @param identifiable the Identifiable to register 028 * @return true if registered/already registered or false if the ID is already existing 029 */ 030 boolean registerIdentification(Identifiable identifiable); 031}