if (content == null) content = getContentEntityManager().getById(id);
ContentEntityObject content = getContent();
    public String asText(MacroInfo info, boolean asWiki)    {        if (content == null)            content = getContentEntityManager().getById(id);        if (content == null)            return "Invalid Content ID: " + id;        String label = content.getRealTitle();        if (asWiki)        {            StringBuffer out = new StringBuffer();            if (content instanceof Page)            {                Page page = (Page) content;                out.append("[").append(label).append("|").append(                        page.getSpaceKey()).append(":").append(page.getTitle())                        .append("]");            }            else if (content instanceof BlogPost)            {                BlogPost blogPost = (BlogPost) content;                out.append("[").append(label).append("|").append(                        blogPost.getSpaceKey()).append(":").append(                        blogPost.getDatePath()).append("]");            }            else                out.append("[$").append(id).append("]");            if (content instanceof SpaceContentEntityObject)            {                SpaceContentEntityObject spacedItem = (SpaceContentEntityObject) content;                if (!spacedItem.getSpace().equals(info.getSpace()))                {                    out.append(" (").append(spacedItem.getSpaceKey()).append(                            ")");                }            }            return out.toString();        }        else            return label;    }