org.wso2.carbon.registry.core.Resource.setDescription()方法的使用及代码示例

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

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

Resource.setDescription介绍

暂无

代码示例

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.mashup.javascript.hostobjects.registry

public void jsSet_description(Object description) throws CarbonException {
  if (description instanceof String) {
    this.resource.setDescription((String) description);
  } else {
    throw new CarbonException("Invalid property type for description");
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

public static void setDescription(UserRegistry registry,
                   String path, String description) throws Exception {

    Resource resource = registry.get(path);
    resource.setDescription(description);
    registry.put(path, resource);
    resource.discard();
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

private static void createSystemConfigNodeTypes(UserRegistry userReg,String workspaceRoot) throws RegistryException {
   String confVerPath = workspaceRoot
      + JCR_SYSTEM_CONFIG
      + "/"
      + JCR_SYSTEM_CONFIG_NODE_TYPES;
   if (!userReg.resourceExists(confVerPath)) {
    Resource resource = (CollectionImpl)userReg.newCollection();
    resource.setDescription("sys:config-jcr-storage");
    resource.setProperty("sys:config","true");
    userReg.put(confVerPath, resource);
   }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

private static void createSystemConfigVersion(UserRegistry userReg,String workspaceRoot) throws RegistryException {
  String confVerPath = workspaceRoot
      + JCR_SYSTEM_CONFIG
      + "/"
      + JCR_SYSTEM_CONFIG_VERSION;
   if (!userReg.resourceExists(confVerPath)) {
    Resource resource = (CollectionImpl)userReg.newCollection();
    resource.setDescription("sys:config-jcr-storage");
    resource.setProperty("sys:config","true");
    userReg.put(confVerPath, resource);
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

private static void createSystemConfigVersionLabelStore(UserRegistry userReg,String workspaceRoot) throws RegistryException {
  String confVerPath = workspaceRoot
      + JCR_SYSTEM_CONFIG
      + "/"
      + JCR_SYSTEM_VERSION_LABELS;
   if (!userReg.resourceExists(confVerPath)) {
    Resource resource = (CollectionImpl)userReg.newCollection();
    resource.setDescription("sys:config-jcr-storage");
    resource.setProperty("sys:config","true");
    userReg.put(confVerPath, resource);
  }
}

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

metadataResource.setDescription(description);

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

public static void updateTextContent(String path, String contentText, Registry registry)
      throws Exception {

    try {
      Resource resource = registry.get(path);
      String mediaType = resource.getMediaType();
      if (resource.getProperty(RegistryConstants.REGISTRY_LINK) != null &&
          (CommonConstants.WSDL_MEDIA_TYPE.equals(mediaType) ||
              CommonConstants.SCHEMA_MEDIA_TYPE.equals(mediaType))) {
        String description = resource.getDescription();
        Properties properties = (Properties) resource.getProperties().clone();
        resource = registry.newResource();
        resource.setMediaType(mediaType);
        resource.setDescription(description);
        resource.setProperties(properties);
      }
      resource.setContent(RegistryUtils.encodeString(contentText));
      registry.put(path, resource);
      resource.discard();

    } catch (RegistryException e) {

      String msg = "Could not update the content of the resource " +
          path + ". Caused by: " + ((e.getCause() instanceof SQLException) ?
          "" : e.getMessage());
      log.error(msg, e);
      throw new RegistryException(msg, e);
    }
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

wsdlResource.setDescription(metadata.getDescription());

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

xsdResource.setDescription(metaResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

resource.setProperty(CommonConstants.SOURCE_PROPERTY, CommonConstants.SOURCE_ADMIN_CONSOLE);
resource.setMediaType(mediaType);
resource.setDescription(description);
resource.setContent(RegistryUtils.decodeBytes(content));

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

if (metadata != null) {
  xsdResource.setMediaType(metadata.getMediaType());
  xsdResource.setDescription(metadata.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

private void createRootNode() throws RepositoryException {
  try {
    if (!userRegistry.resourceExists(RegistryJCRSpecificStandardLoderUtil.
        getJCRRegistryWorkspaceRoot())) {
      Resource resource = (CollectionImpl) userRegistry.newCollection();
      userRegistry.put(RegistryJCRSpecificStandardLoderUtil.
          getJCRRegistryWorkspaceRoot(), resource);
    }
    if(!userRegistry.resourceExists(WORKSPACE_ROOT)) {
    Resource resource = (CollectionImpl) userRegistry.newCollection();
    resource.setDescription("nt:base");
    resource.setProperty("jcr:primaryType", "nt:base");
    userRegistry.put(WORKSPACE_ROOT, resource);
    }
  } catch (RegistryException e) {
    throw new RepositoryException("Registry Exception occurred while creating root node " + e.getMessage());
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

xsdResource.setDescription(metaResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

serviceInfoElement = oldServiceInfoElement;
  resource.setContent(serviceInfoElement.toString());
  resource.setDescription(oldResource.getDescription());
} catch (Exception e) {
  StringBuilder msg = new StringBuilder("Error in parsing the service content of the service. ")

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.api

resource.setDescription(description);

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

serviceInfoElement = oldServiceInfoElement;
  resource.setContent(serviceInfoElement.toString());
  resource.setDescription(oldResource.getDescription());
} catch (Exception e) {
  String msg = "Error in parsing the service content of the service. " +

相关文章