public EntityReference getParsedExemplar() { // super simple result for now -AZ return new EntityReference(); }
public EntityReference getParsedExemplar() { // super simple result for now -AZ return new EntityReference(); }
public Object getEntity(EntityReference ref) { return new EntityData(new EntityReference("dummy reference"), "dummy"); }
public Object getEntity(EntityReference ref) { return new EntityData(new EntityReference("dummy reference"), "dummy"); }
public Object getEntity(EntityReference ref) { return new EntityData(new EntityReference("dummy reference"), "dummy"); }
public Object getEntity(EntityReference ref) { return new EntityData(new EntityReference("dummy reference"), "dummy"); }
/** * @deprecated do not use this method anymore, use the constructors for {@link EntityReference} */ public static String getID(String reference) { return new EntityReference(reference).getId(); }
/** * @deprecated use {@link #getProviderByPrefix(String)} instead */ public EntityProvider getProviderByReference(String reference) { EntityReference ref = new EntityReference(reference); return getProviderByPrefix(ref.prefix); }
public String getToolIdFromToolRef(String toolReference) { String toolId = null; if (toolReference != null) { toolId = new EntityReference(toolReference).getId(); } return toolId; }
public String getLocationIdFromRef(String locationReference) { String locationId = null; if (locationReference != null) { // assume the form of "/site/siteId" (the Site method is protected) locationId = new EntityReference(locationReference).getId(); } return locationId; }
public String getUserIdFromRef(String userReference) { String userId = null; if (userReference != null) { if (userReference.startsWith("/")) { // assume the form of "/user/userId" (the UDS method is protected) userId = new EntityReference(userReference).getId(); } else { // otherwise assume this is the id userId = userReference; } } return userId; }
public String getLocationReferenceURL(String locationReference) { new EntityReference(locationReference); // validate the reference return getPortalURL() + locationReference; }
/** * Will convert a reference into an id (even if it is not a reference) * @param reference an entity reference (e.g. /user/aaronz) * @return the id from the reference (e.g. aaronz), preserves null */ public static String getIdFromRef(String reference) { String id = null; if (reference != null) { if (reference.startsWith("/")) { // assume the form of "/user/userId" id = new EntityReference(reference).getId(); } else { // otherwise assume this is the id id = reference; } } return id; }
public List<EntityData> getEntities(String prefix, Search search, Map<String, Object> params) { EntityReference ref = new EntityReference(prefix, ""); List<EntityData> data = null; try { requestStorage.setRequestValues(params); if (params == null) { params = new HashMap<String, Object>(); } data = entityBrokerManager.getEntitiesData(ref, search, params); } finally { requestStorage.reset(); } return data; }
public List<?> fetchEntities(String prefix, Search search, Map<String, Object> params) { EntityReference ref = new EntityReference(prefix, ""); List<?> l = null; try { requestStorage.setRequestValues(params); if (params == null) { params = new HashMap<String, Object>(); } l = entityBrokerManager.fetchEntities(ref, search, params); } finally { requestStorage.reset(); } return l; }
/** * Creates a copy of an entity reference * @param ref an entity reference object * @return the new copy of the ref * @throws IllegalArgumentException if the ref is invalid OR null */ public static EntityReference copy(EntityReference ref) { if (ref == null) { throw new IllegalArgumentException("input entity reference must not be null"); } EntityReference copy = new EntityReference(ref.getPrefix(), ref.getId() == null ? "" : ref.getId()); return copy; }
public String getCurrentToolReference() { String toolRef = null; String toolId = toolManager.getCurrentTool().getId(); // assume the form /tool/toolId if (toolId != null) { toolRef = new EntityReference("tool", toolId).toString(); } return toolRef; }
private EntityData makeEntityData(MyEntity myEntity) { EntityReference ref = new EntityReference(getEntityPrefix(), myEntity.getId()); EntityData ed = new EntityData(ref, myEntity.getStuff(), myEntity); return ed; }
private EntityData makeEntityData(MyEntity myEntity) { EntityReference ref = new EntityReference(getEntityPrefix(), myEntity.getId()); EntityData ed = new EntityData(ref, myEntity.getStuff(), myEntity); return ed; }
private void doIt(OrganizationServiceStub stub, OptionSetValue state, OptionSetValue status) { OrganizationRequest request = new OrganizationRequest(); request.setRequestName("SetState"); ParameterCollection collection = new ParameterCollection(); collection.addKeyValuePairOfstringanyType(pair("State", state)); collection.addKeyValuePairOfstringanyType(pair("Status", status)); request.setParameters(collection); Guid g = new Guid(); g.setGuid("abc0def-ghi"); EntityReference ref = new EntityReference(); ref.setId(g); ref.setLogicalName("ei_teacherdetails"); collection.addKeyValuePairOfstringanyType(pair("EntityMoniker", ref)); Execute exe = new Execute(); exe.setRequest(request); stub.execute(exe); }