Posts Tagged ‘filter’

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.