本文整理汇总了Java中org.apache.jackrabbit.value.ValueFactoryImpl类的典型用法代码示例。如果您正苦于以下问题:Java ValueFactoryImpl类的具体用法?Java ValueFactoryImpl怎么用?Java ValueFactoryImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ValueFactoryImpl类属于org.apache.jackrabbit.value包,在下文中一共展示了ValueFactoryImpl类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: populateItem
import org.apache.jackrabbit.value.ValueFactoryImpl; //导入依赖的package包/类
private void populateItem(InputStream inputStream, Node qrCodeNode, final String fileName) throws RepositoryException {
if (inputStream != null) {
try {
Property data = getPropertyOrNull(qrCodeNode, JCR_DATA);
Binary binary = ValueFactoryImpl.getInstance().createBinary(inputStream);
if (data == null) {
qrCodeNode.setProperty(JCR_DATA, binary);
} else {
data.setValue(binary);
}
setProperty(qrCodeNode, FileProperties.PROPERTY_FILENAME, fileName);
setProperty(qrCodeNode, FileProperties.PROPERTY_CONTENTTYPE, MIME_TYPE);
Calendar calValue = new GregorianCalendar(TimeZone.getDefault());
setProperty(qrCodeNode, FileProperties.PROPERTY_LASTMODIFIED, calValue);
} catch (RepositoryException re) {
LOGGER.error("Could not get Binary. Upload will not be performed", re);
}
}
}
开发者ID:aperto,项目名称:magnolia-vanity-url,代码行数:21,代码来源:VanityUrlSaveFormAction.java
示例2: jcrDateFormat
import org.apache.jackrabbit.value.ValueFactoryImpl; //导入依赖的package包/类
public String jcrDateFormat(String date) throws ValueFormatException, IllegalStateException, RepositoryException, ParseException {
final Calendar cal = Calendar.getInstance();
cal.setTime(
decodeShortDate(date));
return ValueFactoryImpl.getInstance().createValue(cal).getString();
}
开发者ID:cheetah100,项目名称:gravity,代码行数:8,代码来源:ListTools.java
示例3: setupAsset1
import org.apache.jackrabbit.value.ValueFactoryImpl; //导入依赖的package包/类
public Node setupAsset1() throws RepositoryException {
// Set up page1
Node asset1 =
session.getRootNode()
.addNode("content")
.addNode("dam", "sling:Folder")
.addNode("foo.jpg", "dam:Asset")
.addNode("jcr:content", "dam:AssetContent");
asset1
.addNode("metadata").setProperty("dc:title", "Foo");
asset1
.addNode("renditions", "nt:folder")
.addNode("original", "nt:file")
.addNode("jcr:content", "nt:resource")
.setProperty("data", ValueFactoryImpl.getInstance().createBinary(new ByteArrayInputStream("test binary string".getBytes())));
asset1
.setProperty("text", "t");
// Set a property
Calendar c = Calendar.getInstance();
Date d = new Date();
d.setTime(0);
c.setTime(d);
asset1.setProperty("jcr:lastModified", c);
return asset1;
}
开发者ID:Adobe-Consulting-Services,项目名称:acs-aem-commons,代码行数:31,代码来源:ChecksumGeneratorImplTest.java
示例4: getFormattedDate
import org.apache.jackrabbit.value.ValueFactoryImpl; //导入依赖的package包/类
private String getFormattedDate(Date date) {
String formattedDate = "";
Calendar cal = Calendar.getInstance();
cal.setTime(date);
try {
formattedDate = ValueFactoryImpl.getInstance().createValue(cal).getString();
} catch (Exception e) {
// should never happen
e.printStackTrace();
}
return formattedDate;
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:13,代码来源:JcrStorageDao.java
注:本文中的org.apache.jackrabbit.value.ValueFactoryImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论