本文整理了Java中org.wso2.carbon.registry.core.Resource.getId
方法的一些代码示例,展示了Resource.getId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resource.getId
方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Resource
类名称:Resource
方法名:getId
暂无
代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.mashup.javascript.hostobjects.registry
public String jsGet_id() {
return this.resource.getId();
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions
public static void applyDefaultLifeCycle(Registry registry, Resource resource, String path, String defaultLifeCycle) throws RegistryException {
if (defaultLifeCycle != null && !defaultLifeCycle.isEmpty()) {
String[] lifeCycles = defaultLifeCycle.split(",");
ArrayUtils.reverse(lifeCycles);
if (CurrentSession.getLocalPathMap() != null && !Boolean.valueOf(CurrentSession.getLocalPathMap().get(CommonConstants.ARCHIEVE_UPLOAD))) {
for (String lifeCycle : lifeCycles) {
if (StringUtils.isNotEmpty(lifeCycle)){
registry.associateAspect(resource.getId(), lifeCycle);
}
}
} else {
for (String lifeCycle : lifeCycles) {
if (StringUtils.isNotEmpty(lifeCycle)){
registry.associateAspect(path, lifeCycle);
}
}
}
}
}
代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.eventing.impl
for (String subsPath : subsPaths) {
Resource resource = registry.get(subsPath);
String id = resource.getId();
Subscription sub = new Subscription();
if (EPR_TYPE.equals(resource.getMediaType())) {
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.cmis
@Override
protected Set<Action> compileAllowableActions(Set<Action> aas) {
Set<Action> result = super.compileAllowableActions(aas);
try {
boolean status = getNode().getContentStream() != null ? true : false;
setAction(result, Action.CAN_GET_CONTENT_STREAM, status);
} catch (RegistryException e) {
log.error("Failed to get the content stream for the node " + getNode().getId() + " " , e);
setAction(result, Action.CAN_GET_CONTENT_STREAM, false);
}
setAction(result, Action.CAN_SET_CONTENT_STREAM, true);
setAction(result, Action.CAN_DELETE_CONTENT_STREAM, true);
setAction(result, Action.CAN_GET_RENDITIONS, false);
return result;
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.cmis
/**
* See CMIS 1.0 section 2.2.7.1 checkOut
*
* @throws CmisRuntimeException
*/
public RegistryPrivateWorkingCopy checkout() {
Resource node = getNode();
try {
if (isCheckedOut(node)) {
throw new CmisConstraintException("Document is already checked out " + node.getId());
}
return getPwc(checkout(getRepository(), node));
}
catch (RegistryException e) {
String msg = "Failed checkout the node with path " + node.getPath();
log.error(msg, e);
throw new CmisRuntimeException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.cmis
cancelCheckout(getRepository(), node);
} else {
throw new CmisStorageException("Cannot delete checked out document: " + node.getId());
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.cmis
/**
* See CMIS 1.0 section 2.2.7.3 checkedIn
*
* @throws CmisRuntimeException
*/
public RegistryVersion checkin(Properties properties, ContentStream contentStream, String checkinComment) {
Resource node = getNode();
try {
if (!isCheckedOut(node)) {
throw new CmisStorageException("Not checked out: " + node.getId());
}
if (properties != null && !properties.getPropertyList().isEmpty()) {
updateProperties(properties);
}
if (contentStream != null) {
setContentStream(contentStream, true);
}
// todo handle checkinComment
Resource resource = checkin();
String pathOfLatestVersion = getRepository().getVersions(resource.getPath())[0];
return new RegistryVersion(getRepository(), resource, pathOfLatestVersion, typeManager, pathManager);
}
catch (RegistryException e) {
String msg = "Failed checkin";
log.error(msg, e);
throw new CmisRuntimeException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.ws.client
public static WSResource transformResourceToWSResource(Resource resource, DataHandler dataHandler) {
WSResource wsResource = new WSResource();
wsResource.setContentFile(dataHandler);
wsResource.setAuthorUserName(resource.getAuthorUserName());
if (resource.getCreatedTime() != null) wsResource.setCreatedTime(resource.getCreatedTime().getTime());
// wsResource.setDbBasedContentID(resource)
wsResource.setDescription(resource.getDescription());
wsResource.setId(resource.getId());
if (resource.getLastModified() != null) wsResource.setLastModified(resource.getLastModified().getTime());
wsResource.setLastUpdaterUserName(resource.getLastUpdaterUserName());
// wsResource.setMatchingSnapshotID(resource.get)
wsResource.setMediaType(resource.getMediaType());
// wsResource.setName(resource.)
wsResource.setParentPath(resource.getParentPath());
wsResource.setPath(resource.getPath());
// wsResource.setPathID();
wsResource.setPermanentPath(resource.getPermanentPath());
if (!resource.getProperties().isEmpty()) wsResource.setProperties(getPropertiesForWSResource(resource.getProperties()));
wsResource.setState(resource.getState());
wsResource.setUUID(resource.getUUID());
// resource.get
return wsResource;
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions
for (String lifeCycle : lifeCycles) {
if (StringUtils.isNotEmpty(lifeCycle)){
registry.associateAspect(resource.getId(),lifeCycle);
内容来源于网络,如有侵权,请联系作者删除!