org.sakaiproject.entity.api.Reference.getContainer()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.sakaiproject.entity.api.Reference.getContainer方法的一些代码示例,展示了Reference.getContainer的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.getContainer方法的具体详情如下:
包路径:org.sakaiproject.entity.api.Reference
类名称:Reference
方法名:getContainer

Reference.getContainer介绍

[英]Access a single container id, the from most general (or only)
[中]访问单个容器id,从最通用(或仅限)开始

代码示例

代码示例来源:origin: org.sakaiproject/sakai-chat-impl

/**
* {@inheritDoc}
*/
public String getContainer(String reference)
{
 try {
   return getReference(reference).getContainer();
 } catch ( Exception ex ) {
   return "";
 }
}

代码示例来源:origin: org.sakaiproject.mailarchive/sakai-search-adapters-impl

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 "";
  }
}

代码示例来源:origin: org.sakaiproject/sakai-rwiki-impl

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 "";
  }
}

代码示例来源:origin: org.sakaiproject/sakai-citations-impl

} else {
  ref.set(APPLICATION_ID, REF_TYPE_VIEW_LIST, wrapped.getId(), wrapped
      .getContainer(), wrapped.getContext());

代码示例来源:origin: org.sakaiproject.metaobj/sakai-metaobj-impl

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;
}

代码示例来源:origin: org.sakaiproject/sakai-chat-impl

ArrayList<RoomObserver> observers = (ArrayList<RoomObserver>) roomListeners.get(ref.getContainer());
    RoomObserver observer = i.next();
    observer.receivedMessage(ref.getContainer(), message);

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * {@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);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * {@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);
  }
}

代码示例来源:origin: org.sakaiproject.message/sakai-message-impl

M_log.debug("refresh(): key " + key + " channel id : " + ref.getContext() + "/" + ref.getContainer()
      + " message id : " + ref.getId());
MessageChannel channel = findChannel(channelReference(ref.getContext(), ref.getContainer()));

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

Reference ref = entityManager().newReference(siteRef);
if (SiteService.GROUP_SUBTYPE.equals(ref.getSubType())) {
  String containerSiteRef = siteService.siteReference(ref.getContainer());
  roleswap = securityService().getUserEffectiveRole(containerSiteRef);
} else {

代码示例来源:origin: org.sakaiproject.message/sakai-message-impl

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()))

代码示例来源:origin: sakaiproject/sakai

String channelRef = channelReference(ref.getContext(), ref.getContainer());
MessageChannel c = findChannel(channelRef);
if (c != null)
rv.add(channelReference(ref.getContext(), ref.getContainer()));

代码示例来源:origin: org.sakaiproject.message/sakai-message-impl

String channelRef = channelReference(ref.getContext(), ref.getContainer());
MessageChannel c = findChannel(channelRef);
if (c != null)
rv.add(channelReference(ref.getContext(), ref.getContainer()));

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

return siteService().allowUpdateSite(ref.getContainer());

代码示例来源:origin: org.sakaiproject.message/sakai-message-util

String channelRef = channelReference(ref.getContext(), ref.getContainer());
MessageChannel c = findChannel(channelRef);
if (c != null)
rv.add(channelReference(ref.getContext(), ref.getContainer()));

代码示例来源:origin: sakaiproject/sakai

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))

代码示例来源:origin: org.sakaiproject.message/sakai-message-util

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))

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

String containerSiteRef = siteService().siteReference(ref.getContainer());
roleswap = getUserEffectiveRole(containerSiteRef);
if (roleswap != null) {

代码示例来源:origin: org.sakaiproject/sakai-rwiki-impl

+ reference.getContainer());
rp.addProperty(RWikiEntity.RP_REALM, reference.getId());
rp.addProperty(RWikiEntity.RP_CONTAINER, "true");

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

Site site = getDefinedSite(ref.getContainer());
rv = site.getGroup(ref.getId());

相关文章