本文整理了Java中org.wso2.carbon.registry.core.Collection.getContent()
方法的一些代码示例,展示了Collection.getContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Collection.getContent()
方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Collection
类名称:Collection
方法名:getContent
暂无
代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.api
/**
* Retrieve all the governance artifact paths which associated with the given lifecycle in the given lifecycle state
*
* @param registry registry instance
* @param lcName lifecycle name
* @param lcState lifecycle state
* @param mediaType mediatype of the artifacts
* @return String array of all the artifact paths
* @throws GovernanceException if the operation failed.
*/
public static String[] getAllArtifactPathsByLifecycleState(
Registry registry, String lcName, String lcState, String mediaType) throws GovernanceException {
String sql = "SELECT R.REG_PATH_ID, R.REG_NAME FROM REG_RESOURCE R, REG_PROPERTY PP, " +
"REG_RESOURCE_PROPERTY RP WHERE R.REG_VERSION=RP.REG_VERSION AND RP.REG_PROPERTY_ID=PP.REG_ID " +
"AND PP.REG_NAME = ? AND PP.REG_VALUE = ? AND R.REG_MEDIA_TYPE = ?";
Map<String, String> parameter = new HashMap<String, String>();
parameter.put("1", "registry.lifecycle." + lcName + ".state");
parameter.put("2", lcState);
parameter.put("3", mediaType);
parameter.put("query", sql);
try {
return (String[]) registry.executeQuery(null, parameter).getContent();
} catch (RegistryException e) {
String msg = "Error occured while executing custom query";
throw new GovernanceException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.api
/**
* Retrieve all the governance artifact paths which associated with the given lifecycle
*
* @param registry registry instance
* @param lcName lifecycle name
* @param mediaType mediatype of the artifacts
* @return String array of all the artifact paths
* @throws GovernanceException if the operation failed.
*/
public static String[] getAllArtifactPathsByLifecycle(Registry registry, String lcName, String mediaType) throws GovernanceException {
String sql = "SELECT R.REG_PATH_ID, R.REG_NAME FROM REG_RESOURCE R, REG_PROPERTY PP, " +
"REG_RESOURCE_PROPERTY RP WHERE R.REG_VERSION=RP.REG_VERSION AND RP.REG_PROPERTY_ID=PP.REG_ID " +
"AND PP.REG_NAME = ? AND PP.REG_VALUE = ? AND R.REG_MEDIA_TYPE = ?";
Map<String, String> parameter = new HashMap<String, String>();
parameter.put("1", "registry.LC.name");
parameter.put("2", lcName);
parameter.put("3", mediaType);
parameter.put("query", sql);
try {
return (String[]) registry.executeQuery(null, parameter).getContent();
} catch (RegistryException e) {
String msg = "Error occured while executing custom query";
throw new GovernanceException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.eventing.impl
if (registry.resourceExists(subscriptionsCollection)) {
Collection subs = (Collection) registry.get(subscriptionsCollection);
String[] subsPaths = (String[]) subs.getContent();
for (String subsPath : subsPaths) {
Resource resource = registry.get(subsPath);
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.event.core
if (userRegistry.resourceExists(topicResourcePath)) {
Collection subscriptions = (Collection) userRegistry.get(topicResourcePath);
String[] subscriptionPaths = (String[]) subscriptions.getContent();
for (String subscriptionPath : subscriptionPaths) {
Resource resource = userRegistry.get(subscriptionPath);
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.indexing
String [] paths;
try {
paths = (String [])registry.searchContent(content).getContent();
} catch (Exception e) {
return new ResourceData[0];
内容来源于网络,如有侵权,请联系作者删除!