com.gentics.portal.node.connector.examples
Class AdvancedPortalConnectorExample

java.lang.Object
  extended by com.gentics.portal.node.connector.examples.AdvancedPortalConnectorExample

public class AdvancedPortalConnectorExample
extends Object

A more advanced example, how to retrieve folders and their content. In addition it demonstrates how to access differerent attribute types.

1 - Text (Short) - Used for names, filenames, etc.
2 - Link to another Object - Used to link pages to folders.
5 - Text (Long) - Used to store page content.
6 - Binary Data - Used to store image/file content.


Constructor Summary
AdvancedPortalConnectorExample()
           
 
Method Summary
protected static com.gentics.api.lib.datasource.Datasource getDatasource()
          Create the datasource
protected static Collection getObjects(com.gentics.api.lib.datasource.Datasource ds, String rule)
          Get the objects filtered by the given rule
static void main(String[] args)
           
protected static String replacePLinks(String pageContent)
          Replaces <plink> tags in a given page content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedPortalConnectorExample

public AdvancedPortalConnectorExample()
Method Detail

main

public static void main(String[] args)
Parameters:
args -

replacePLinks

protected static String replacePLinks(String pageContent)
Replaces <plink> tags in a given page content.

Parameters:
pageContent - the content of a page.
Returns:
the page content with replaced plinks.

getDatasource

protected static com.gentics.api.lib.datasource.Datasource getDatasource()
                                                                  throws Exception
Create the datasource

Returns:
datasource
Throws:
Exception

getObjects

protected static Collection getObjects(com.gentics.api.lib.datasource.Datasource ds,
                                       String rule)
                                throws Exception
Get the objects filtered by the given rule

Parameters:
ds - datasource
rule - rule
Returns:
collection of DatasourceRow objects
Throws:
Exception


Copyright © 2013. All Rights Reserved.