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

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

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

Resource.getLastModified介绍

暂无

代码示例

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

/**
 * @return  the last modification date of the CMIS object represented by this instance
 * @throws RegistryException
 */
protected GregorianCalendar getLastModified() throws RegistryException {
  GregorianCalendar gregorianCalendar = new GregorianCalendar();
  gregorianCalendar.setTime(resource.getLastModified());
  return gregorianCalendar;
}

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

/**
 *  Method to set the resource last updated date to IndexDocument attribute list.
 */
private void addLastUpdatedDate() {
  // Set the last updated date
  Date updatedDate = resource.getLastModified();
  if (updatedDate != null) {
    attributes.put(IndexingConstants.FIELD_LAST_UPDATED_DATE, Arrays.asList(updatedDate.toString()));
  }
}

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

public int compare(String path1, String path2) {
    try {
      return registry.getMetaData(path2).getLastModified().compareTo(registry.getMetaData(path1).getLastModified());
    } catch(RegistryException ex) {
      return 0 ;
    }
  }
});

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

public int compare(String path1, String path2) {
    try {
      return registry.getMetaData(path1).getLastModified().compareTo(registry.getMetaData(path2).getLastModified());
    } catch(RegistryException ex) {
      return 0 ;
    }
  }
});

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

public Scriptable jsGet_lastUpdatedTime() {
  return Context.toObject(this.resource.getLastModified(), this);
}

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

response.setDateHeader("Last-Modified", resource.getLastModified().getTime());

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

lastModified.setTime(resource.getLastModified());
bean.setLastUpdatedTime(lastModified);
bean.setResourceName(RegistryUtils.getResourceName(path));

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

Documentation doc = AppManagerUtil.getDocumentation(docArtifact);
Date contentLastModifiedDate;
Date docLastModifiedDate = docResource.getLastModified();
if (Documentation.DocumentSourceType.INLINE.equals(doc.getSourceType())) {
  String contentPath = AppManagerUtil.getAPIDocContentPath(appId, doc.getName());
  contentLastModifiedDate = registry.get(contentPath).getLastModified();
  doc.setLastUpdated((contentLastModifiedDate.after(docLastModifiedDate) ?
            contentLastModifiedDate : docLastModifiedDate));

代码示例来源: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.appmgt/org.wso2.carbon.appmgt.impl

Documentation doc = AppManagerUtil.getDocumentation(docArtifact, apiId.getProviderName());
Date contentLastModifiedDate;
Date docLastModifiedDate = docResource.getLastModified();
if (Documentation.DocumentSourceType.INLINE.equals(doc.getSourceType())) {
  String contentPath = AppManagerUtil.getAPIDocContentPath(apiId, doc.getName());
  contentLastModifiedDate = registry.get(contentPath).getLastModified();
  doc.setLastUpdated((contentLastModifiedDate.after(docLastModifiedDate) ?
            contentLastModifiedDate : docLastModifiedDate));

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

versionPath.setUpdater(versionResource.getLastUpdaterUserName());
Calendar versionLastModified = Calendar.getInstance();
versionLastModified.setTime(versionResource.getLastModified());
versionPath.setUpdatedOn(versionLastModified);
versionResource.discard();

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

webApp.setLastUpdated(registry.get(artifactPath).getLastModified());
webApp.setLastUpdated(registry.get(artifactPath).getLastModified());
String defaultVersion = AppMDAO.getDefaultVersion(apiName, providerName,
    AppDefaultVersion.APP_IS_ANY_LIFECYCLE_STATE);

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

api.setLastUpdated(registry.get(artifactPath).getLastModified());
api.setLastUpdated(registry.get(artifactPath).getLastModified());

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

api.setLastUpdated(registry.get(artifactPath).getLastModified());
api.setLastUpdated(registry.get(artifactPath).getLastModified());

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

api.setLastUpdated(registry.get(artifactPath).getLastModified());
api.setLastUpdated(registry.get(artifactPath).getLastModified());

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

bean.setPath(resource.getPath());
bean.setFormattedCreatedOn(CommonUtil.formatDate(resource.getCreatedTime()));
bean.setFormattedLastModified(CommonUtil.formatDate(resource.getLastModified()));

相关文章