@Override public String getReference() { return (reference != null) ? reference.getReference() : null; }
public String getReference() { return reference.getReference(); }
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ReferenceHolder)) { return false; } final ReferenceHolder referenceHolder = (ReferenceHolder) o; if (base != null ? !base.getReference().equals(referenceHolder.base.getReference()) : referenceHolder.base != null) { return false; } return true; }
private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.writeObject(base.getReference()); }
public Collection getEntityAuthzGroups(Reference ref, String userId) { Collection azGroups = null; // entities that are actually in /content use the /content authz groups if(ref != null && ref.getReference() != null && ref.getReference().startsWith("/citation/content/")) { String altRef = ref.getReference().substring("/citation".length()); azGroups = m_contentHostingService.getEntityAuthzGroups(m_entityManager.newReference(altRef), userId); } return azGroups; }
@Override public String getUrl() { return (reference != null) ? getAccessPoint(false) + reference.getReference() : null; }
public String createPermissionsReference(String pageSpace) { // Page space is assumed to be a ppage space reference // Turn into an entity and then get a reference Reference ref = entityManager .newReference(RWikiObjectService.REFERENCE_ROOT + pageSpace + "."); //$NON-NLS-1$ return ref.getReference(); }
/** * {@inheritDoc} */ public String getEntityUrl(Reference ref) { return ServerConfigurationService.getAccessUrl() + ref.getReference(); }
public String getUrl() { return entityBrokerManager.getEntityURL(reference.getReference(), null, null); }
public String getUrl(String rootProperty) { return entityBrokerManager.getEntityURL(reference.getReference(), null, null); }
public String getEntityUrl(Reference ref) { return entityBrokerManager.getEntityURL(ref.getReference(), null, null); }
public ResourceProperties getEntityResourceProperties(Reference ref) { try { String reference = ref.getReference(); int lastIndex = reference.lastIndexOf(Entity.SEPARATOR); String postId = reference.substring(lastIndex, reference.length() - lastIndex); Entity entity = persistenceManager.getPost(postId, false); return entity.getProperties(); } catch (Exception e) { log.warn("getEntity(): " + e); return null; } }
public Entity getEntity(Reference ref) { // TODO Auto-generated method stub Entity rv = null; if (REF_POLL_TYPE.equals(ref.getSubType())) { rv = getPoll(ref.getReference()); } return rv; }
public String getEntityUrl(Reference ref) { return ServerConfigurationService.getAccessUrl() + Validator.escapeUrl(ref.getReference()); }
protected ReferenceParser createParser(Reference ref) { return new ReferenceParser(ref.getReference(), ref.getEntityProducer()); }
/** * {@inheritDoc} */ public int getRevision(Reference reference) { if (!isAvailable()) return 0; Decoded decode = decode(reference.getReference()); return Integer.parseInt(decode.getVersion()); }
protected void checkSource(Reference ref, ReferenceParser parser) throws EntityPermissionException, EntityNotDefinedException, EntityAccessOverloadException, EntityCopyrightException { logger.debug(".checkSource(): " + parser.getId()); logger.debug(".checkSource(); ref: " + ref.getReference()); getStructuredArtifactDefinitionManager().checkFormAccess(parser.getId()); }
/** * ResourcesAction calls this method before starting the helper. This is intended to give * the registrant a chance to do any preparation needed before the helper starts with respect * to this action and the reference specified in the parameter. The method returns a String * (possibly null) which will be provided as the "initializationId" parameter to other * methods and in * * @param reference * @return */ public String initializeAction(Reference reference) { return getInitializationId(reference.getReference(), this.getTypeId(), this.getId()); }
/** * ResourcesAction calls this method before starting the helper. This is intended to give * the registrant a chance to do any preparation needed before the helper starts with respect * to this action and the reference specified in the parameter. The method returns a String * (possibly null) which will be provided as the "initializationId" parameter to other * methods and in * * @param reference * @return */ public String initializeAction(Reference reference) { return getInitializationId(reference.getReference(), this.getTypeId(), this.getId()); }
protected ContentEntityWrapper getContentEntityWrapper(Reference ref) { String wholeRef = ref.getReference(); ReferenceParser parser = parseReference(wholeRef); ContentResource base = (ContentResource) entityManager.newReference(parser.getRef()).getEntity(); //base could be null because we have a second level of wrapping if (base == null) { parser = parseReference(ref.getReference()); base = (ContentResource) entityManager.newReference(parser.getRef()).getEntity(); } return new ContentEntityWrapper(base, wholeRef); }