Posts Tagged ‘Flex’

We will now see the implementation of FieldCopier Flex Filter in Oracle WebCenter Sites / Fatwire.

Purpose: The purpose of this filter is to get information from the system attributes such as NAME, FLEX DEFINITION, CREATED DATE, etc. There are totally 18 system attributes, out of which, a few are inaccessible through code. Under such circumstances, we will use this FieldCopier filter to gather the values from the system attributes, and place the values in our custom attributes.

We will try to copy the name and content definition attributes (system attributes) to our custom attributes in the following implementation.


Create the below two flex attributes.

1. Name-FieldCopier   –  (String)
2. ContentDefinition-FieldCopier –  (String)


Now, create the flex filter for field copier:

1. Click on new Flex Filter.

2. Give a name.

3. In the FILTER drop down, select the FIELDCOPIER option. Then Click on the GET ARGUMENTS button.

4. In the ARGUMENTS section, you will see a drop down box. In that dropdown, select the following options.

  •   name    –   In the value text box, enter  Name-FieldCopier    –  Click on ADD button.
  •   FlexDefinition     –   In the value text box, enter  ContentDefinition-FieldCopier   –  Click on ADD button

5. Save.

After saving the filter, the screen should look like follows:


1. Add the filter to either new content definitions or existing content definitions.

2. After adding the filter, the content definition looks as follows.


Now, its time to test the filter which we have created. Create a new asset of type SAMPLE_C, and select the above content definition.

Give a name to the asset. Click on Save. Then, click on Inspect button. The following screen appears.

The two attributes which we have created, Name-FieldCopier, ContentDefinition-FieldCopier are appended to the assets meta-data, as shown in the above screen.

That’s it. We have successfully created the FIELD COPIER filter.

What is a Flex Filter?

A FLEX FILTER is a utility, that performs operations on the flex assets, for which that filter is assigned. The filter will be called only after the particular asset (for which this filter is assigned)  is saved. Flex filter classes implement the functionality of flex filter assets.

How many types of filters are there in total?

Oracle WebCenter Sites / Fatwire Content Server ships with FOUR Flex Filters by default. We also have the provision to create our custom filters. This can be done by creating new jar files, and registering them in the database. Following are the different types of Flex Filters available.

1.   Doc-Type Filter – Used to get the MIME Type / File Types.

2.   Thumbnail Creator – Used to convert an image into a thumbnail.

3.   Field Copier – Used to copy the contents of a system-defined attributes like name, template, etc (Totally 18 system attributes are there) into a user-defined attribute, to be used within the code.

4.   Document Transformation – Converts a document from one file type into another.

We will discuss about these Filters in detail, in the upcoming posts.

When to Use the Flex Asset Model in Fatwire?

Flex assets means FLEXIBLE ASSETS. Meaning, that we can add fields at any moment to the asset. You can update your site at any time, adding new fields, without disturbing the existing content.

FLEX ASSET MODEL has been the favorite model for the developers who concentrate on developing WEB EXPERIENCE MANAGEMENT applications. The Flex model helps in achieving the website’s goal of targeting the audience/visitors, and hence improving the overall business by the websites. The Flex Asset Model is the choice of developers, when the data has the following characteristics:

  • MANY ATTRIBUTES:  The assets have very large number of attributes, like some hundreds of attributes.
  • NEEDS HIERARCHY:  The assets need to inherit attributes from their parents.
  • UNPREDICTED ATTRIBUTES: This means that we know that we cannot predict what attributes might be necessary in the future.
  • NAVIGATION: Visitors browse your site by navigating through “drill-down” searches that are based on the attribute values of your data.
  • ENGAGE: You want to use Engage.

If implemented correctly, the Flex asset model yields major benefits for the business through websites.

But, to build a Flex asset model, a lot of complex work needs to be done. The following needs to be kept in mind, while choosing this Flex asset model.

  • COMPLEX DATABASE: The underlying database structure of flex assets is pretty complex.
  • SLOW RATE: Asset creation is slower that Basic assets.
  • SEARCH: Searching attributes requires complex code.