/** * This method return Type with a specified typeId, used by ItemFacade.getItemType() * * @param typeId * @return org.osid.shared.Type or null if no types of that id */ public Type getTypeById(Long typeId) { // pbd hack List typeList = getAllTypes(); this.typeFacadeMap = createTypeFacadeMapById(typeList); // end pbd hack TypeFacade typeFacade = getTypeFacadeById(typeId); // SAM-1792 this could be a request for an unkown type if (typeFacade == null) { log.warn("Unable to find Item Type: " + typeId.toString()); return null; } TypeExtension type = new TypeExtension( typeFacade.getAuthority(), typeFacade.getDomain(), typeFacade.getKeyword(), typeFacade.getDescription()); return type; }
public void listType() { TypeFacadeQueriesAPI typeFacadeQueries = PersistenceService.getInstance().getTypeFacadeQueries(); TypeFacade f = typeFacadeQueries.getTypeFacadeById(1L); log.debug("***facade: " + f.getAuthority()); }