Currently im working with a 4.4.9 CE. 
I do some programmatic filtering of content nodes including images 
(controlType: file, type: binary).
I use the Node-API there to traverse and read the nodes. 
But to get access to the image nodes [code]FileProperties[/code] only provides 
a constructor with a [code]Content[/code] Object as parameter. 

In this case i go back to Content api via sth. like:
[code]
   //1. Change API
   Node node = ...
   HierarchyManager hm = 
MgnlContext.getHierarchyManager(ContentRepository.WEBSITE);
   Content content = new DefaultContent(node, hm);
   ...
   //2. Get Values
   FileProperties properties = new FileProperties(content, "image");
   properties.getProperty(SIZE);
   properties.getProperty(EXTENSION);
   ...
[/code]

I know that 4.5.* it would be possible to use 
[code]ContentUtil.asContent(Node)[/code] for step 1. 
But how would avoid step 1 and do step 2 only using the Node-Api either in 
4.4.5 or in 4.5.* ?

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=468190f4-5fa7-4dad-be23-9401c7142f6a
Register for the Magnolia Conference 2013 : 
http://www.magnolia-cms.com/conference/register.html


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to