/** * Returns the fragment of the URL path belonging to the id * <p> * For instance, an Id of type ServiceTemplateId has * <code>servicetemplates/{double encoded ns}/{double encoded name}/</code> * * @param id the element to return the path fragment for * @return the path fragment to be used inside an URL */ public static String getURLPathFragment(GenericId id) { return IdUtil.getPathFragment(id, true); }
/** * Returns the fragment of the path belonging to the id * <p> * For instance, an Id of type ServiceTemplateId has * <code>servicetemplates/{encoded ns}/{encoded name}/</code> * * @param id the element to return the path fragment for * @return the path fragment. This is <em>not</em> intended to be used * inside a URL */ public static String getPathFragment(GenericId id) { return IdUtil.getPathFragment(id, false); }
toInsert = Util.URLencode(toInsert); return IdUtil.getPathFragment(id.getParent()) + toInsert + "/"; } else { throw new IllegalStateException("Unknown subclass of GenericId " + id.getClass());
return res; } else if (id instanceof DefinitionsChildId) { return IdUtil.getPathFragment(id); } else if (id instanceof ToscaElementId) {