javax.jcr.Repository.isStandardDescriptor()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(95)

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

Repository.isStandardDescriptor介绍

[英]Returns true if key is a standard descriptor defined by the string constants in this interface and false if it is either a valid implementation-specific key or not a valid key.
[中]如果key是由该接口中的字符串常量定义的标准描述符,则返回true;如果false是有效的实现特定键或无效键,则返回false

代码示例

代码示例来源:origin: ModeShape/modeshape

@Override
public boolean isStandardDescriptor( String key ) {
  return repository.isStandardDescriptor(key);
}

代码示例来源:origin: io.wcm/io.wcm.testing.sling-mock

@Override
public boolean isStandardDescriptor(final String key) {
 return this.delegate.isStandardDescriptor(key);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.commons.testing

public boolean isStandardDescriptor(String key) {
  return wrapped.isStandardDescriptor(key);
}

代码示例来源:origin: apache/jackrabbit

/** {@inheritDoc} */
public boolean isStandardDescriptor(String key) throws RemoteException {
  return repository.isStandardDescriptor(key);
}

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

@Override
public boolean isStandardDescriptor(String key) {
  return delegate.isStandardDescriptor(key);
}

代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector

public boolean isStandardDescriptor(String key) {
  return repository.isStandardDescriptor(key);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

public boolean isStandardDescriptor(String key) {
  return repository.isStandardDescriptor(key);
}

代码示例来源:origin: org.onehippo.cms7.hst.components/hst-core

public boolean isStandardDescriptor(String key) {
  return delegatee.isStandardDescriptor(key);
}

代码示例来源:origin: org.onehippo.cms7.hst.components/hst-session-pool

public boolean isStandardDescriptor(String key) {
  Repository curRepository = getCurrentThreadRepository();
  if (curRepository != null) {
    return curRepository.isStandardDescriptor(key);
  }
  return false;
}

代码示例来源:origin: org.apache.sling/org.apache.sling.jcr.base

@Override
  public boolean isStandardDescriptor(String key) {
    Repository repo = getRepository();
    if (repo != null) {
      return repo.isStandardDescriptor(key);
    }

    logger.error("isStandardDescriptor: Repository not available");
    return false;
  }
}

代码示例来源:origin: org.onehippo.cms7.hst.components/hst-session-pool

public boolean isStandardDescriptor(String key) {
  try {
    return getRepository().isStandardDescriptor(key);
  } catch (RepositoryException e) {
    log.error("RepositoryException: ",e);
  }
  return false;
}

代码示例来源:origin: org.onehippo.cms7.hst.components/hst-session-pool

public boolean isStandardDescriptor(String key) {
  if (jcrDelegateeRepository != null) {
    return jcrDelegateeRepository.isStandardDescriptor(key);
  }
  if (hippoRepository != null) {
    ClassLoader currentClassloader = switchToRepositoryClassloader();
    try {
      return hippoRepository.getRepository().isStandardDescriptor(key);
    } finally {
      if (currentClassloader != null) {
        Thread.currentThread().setContextClassLoader(currentClassloader);
      }
    }
  }
  return false;
}

代码示例来源:origin: apache/jackrabbit

/**
 * Tests that the required repository descriptors are available.
 */
public void testRequiredDescriptors() {
  Repository rep = session.getRepository();
  for (Iterator<String> it = requiredDescriptorKeys.iterator(); it.hasNext();) {
    String descName = it.next();
    assertTrue(descName + " is a standard descriptor", rep.isStandardDescriptor(descName));
    if (rep.isSingleValueDescriptor(descName)) {
      Value val = rep.getDescriptorValue(descName);
      assertNotNull("Required descriptor is missing: " + descName,
          val);
    } else {
      Value[] vals = rep.getDescriptorValues(descName);
      assertNotNull("Required descriptor is missing: " + descName,
          vals);
    }
  }
}

相关文章