Page History
...
Code Block | ||
---|---|---|
| ||
InputStream stream = new ByteArrayInputStream(contentString.getBytes("UTF-8")); CustomContentProperties properties = new CustomContentProperties(); properties.setProperty("customProperty", new StringValue("value")); String contentName = "content name"; String contentType = "text/plain"; if(contentManager instanceof IChannelContentManager channelContentManager) { // Using the Java NIO-based API introduced in Blueriq 17.4 GUID contentId = channelContentManager.create(Channels.newChannel(stream), contentName, contentType, null, null, properties, context.getSessionScope().getActiveUser()); } else { // Using the stream-based API that was deprecated in Blueriq 17.4 and might be released in a future release GUID contentId = contentManager.create(stream, contentName, contentType, null, null, properties, context.getSessionScope().getActiveUser()); } |
...
Overview
Content Tools