/** * {@inheritDoc} */ public String getContainer(String reference) { try { return getReference(reference).getContainer(); } catch ( Exception ex ) { return ""; } }
public String getContainer(String reference) { try { String r = getReference(reference).getContainer(); if (log.isDebugEnabled()) { log.debug("Message." + toolName + ".getContainer" + reference + ":" + r); } return r; } catch (Exception ex) { return ""; } }
public String getContainer(String reference) { try { String r = getReference(reference).getContainer(); if (log.isDebugEnabled()) { log.debug("Wiki.getContainer:" + reference + ":" + r); } return r; } catch (Exception ex) { return ""; } }
} else { ref.set(APPLICATION_ID, REF_TYPE_VIEW_LIST, wrapped.getId(), wrapped .getContainer(), wrapped.getContext());
public boolean parseEntityReference(String reference, Reference ref) { if (reference.startsWith(getContext())) { // removing our label, we expose the wrapped Entity reference String wrappedRef = reference.substring(getLabel().length() + 1); // make a reference for this Reference wrapped = entityManager.newReference(wrappedRef); // use the wrapped id, container and context - our own type (no subtype) ref.set(getLabel(), null, wrapped.getId(), wrapped.getContainer(), wrapped.getContext()); return true; } return false; }
ArrayList<RoomObserver> observers = (ArrayList<RoomObserver>) roomListeners.get(ref.getContainer()); RoomObserver observer = i.next(); observer.receivedMessage(ref.getContainer(), message);
/** * {@inheritDoc} */ public Group getGroup(String id) { if (id == null) return null; // if this is a reference, starting with a "/", parse it, make sure it's // a group, in this site, and pull the id if (id.startsWith(Entity.SEPARATOR)) { Reference ref = siteService .entityManager().newReference(id); if ((SiteService.APPLICATION_ID.equals(ref.getType())) && (SiteService.GROUP_SUBTYPE.equals(ref.getSubType())) && (m_id.equals(ref.getContainer()))) { return (Group) ((ResourceVector) getGroups()).getById(ref.getId()); } return null; } return (Group) ((ResourceVector) getGroups()).getById(id); }
/** * {@inheritDoc} */ public void refreshAuthzGroup(BaseAuthzGroup azGroup) { if (azGroup == null) return; if (azGroup.m_isNew) { // refresh new authz groups immediately log.debug("Refresh new authz group: {}", azGroup.getId()); refreshAuthzGroupInternal(azGroup); // refresh parent Reference reference = entityManager.newReference(azGroup.getId()); if (SiteService.APPLICATION_ID.equals(reference.getType()) && SiteService.GROUP_SUBTYPE.equals(reference.getSubType())) { try { refreshAuthzGroupInternal((BaseAuthzGroup) getAuthzGroup(siteService.siteReference(reference.getContainer()))); } catch (Exception e) { log.warn("Cannot refresh parent authz group for authz group: {}", azGroup.getId(), e); } } } else { // Add the AuthzGroup to the queue, keyed on id to eliminate duplicate refreshes log.debug("Queue authz group for refresh " + azGroup.getId()); refreshQueue.put(azGroup.getId(), azGroup); } }
M_log.debug("refresh(): key " + key + " channel id : " + ref.getContext() + "/" + ref.getContainer() + " message id : " + ref.getId()); MessageChannel channel = findChannel(channelReference(ref.getContext(), ref.getContainer()));
Reference ref = entityManager().newReference(siteRef); if (SiteService.GROUP_SUBTYPE.equals(ref.getSubType())) { String containerSiteRef = siteService.siteReference(ref.getContainer()); roleswap = securityService().getUserEffectiveRole(containerSiteRef); } else {
MessageChannel c = findChannel(channelReference(ref.getContext(), ref.getContainer())); if (c == null) throw new IdUnusedException(ref.getContainer()); !m.getProperties().getProperty(ResourceProperties.PROP_PUBVIEW).equals(Boolean.TRUE.toString())) if (!allowGetMessage(channelReference(ref.getContext(), ref.getContainer()), ref.getReference()))
String channelRef = channelReference(ref.getContext(), ref.getContainer()); MessageChannel c = findChannel(channelRef); if (c != null) rv.add(channelReference(ref.getContext(), ref.getContainer()));
String channelRef = channelReference(ref.getContext(), ref.getContainer()); MessageChannel c = findChannel(channelRef); if (c != null) rv.add(channelReference(ref.getContext(), ref.getContainer()));
return siteService().allowUpdateSite(ref.getContainer());
String channelRef = channelReference(ref.getContext(), ref.getContainer()); MessageChannel c = findChannel(channelRef); if (c != null) rv.add(channelReference(ref.getContext(), ref.getContainer()));
MessageChannel c = findChannel(channelReference(ref.getContext(), ref.getContainer())); if (c == null) throw new IdUnusedException(ref.getContainer()); if (!allowGetMessage(channelReference(ref.getContext(), ref.getContainer()), ref.getReference(), isDraft))
MessageChannel c = findChannel(channelReference(ref.getContext(), ref.getContainer())); if (c == null) throw new IdUnusedException(ref.getContainer()); if (!allowGetMessage(channelReference(ref.getContext(), ref.getContainer()), ref.getReference(), isDraft))
String containerSiteRef = siteService().siteReference(ref.getContainer()); roleswap = getUserEffectiveRole(containerSiteRef); if (roleswap != null) {
+ reference.getContainer()); rp.addProperty(RWikiEntity.RP_REALM, reference.getId()); rp.addProperty(RWikiEntity.RP_CONTAINER, "true");
Site site = getDefinedSite(ref.getContainer()); rv = site.getGroup(ref.getId());