/** * Get the entity data for a reference if possible * * @param ref an entity reference * @return an {@link EntityData} object for this reference if one can be found OR null if not */ public EntityData getEntityData(EntityReference ref) { if (ref == null) { throw new IllegalArgumentException("ref cannot be null"); } EntityData ed = null; Object obj = fetchEntityObject(ref); if (obj != null) { ed = EntityDataUtils.makeEntityData(ref, obj); populateEntityData(new EntityData[] {ed} ); } else { if (entityExists(ref)) { String url = getEntityURL(ref.toString(), EntityView.VIEW_SHOW, null); ed = new EntityData(ref, (String)null); ed.setEntityURL(url); } } return ed; }
String partialURL = view.getEntityURL(); String fullURL = makeFullURL( partialURL ); entityData.setEntityURL( fullURL );