Managing Non-versioned repositories in BCC.
To Manage non-versioned repositories in BCC, we have to follow the below steps.
1)Setup the Repository in the Publishing Module.
2)Add new link to the left navigation bar in BCC home page.
3)Implement a New List View
4)Register Custom services with ApplicationConfigurationManager
Let us see all the steps in detailed manner.
1)Setup the Repository in the Publishing Module.
Create the required tables in the CORE (Production) schema. Configure the repository component in the Publishing module as shown below. Note that the component is created as an instance of GSARepository class and dataSource is pointing to production.
Sample code.
#/com/repository/test/MySampleRepository
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=MySampleRepository
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
dataSource=/atg/dynamo/service/jdbc/JTDataSource
definitionFiles=/com/repository/test/mySampleRepository.xm
2)Add new link to the left navigation bar in BCC home page.
The ActivityManager (/atg/bizui/activity/ActivityManager) component configures the left-side navigation panel on the BCC home page. Each section of the panel is defined by an element of the ActivityManager’s activitySources array. New sections can be added to the panel by appending ActivitySource to this array.
An activity source controls the links on the left nav on the BCC home screen. All activity sources are registered with the ActivityManager component (/atg/bizui/activity/ActivityManager). When rendering the home page, the ActivityManager cycles through all the registered ActivitySource components and displays left navigation links for each of them on the BCC home page.
OOTB ActivitySource components used in BCC
a. Content Administration – /atg/bizui/activity/PublishingActivitySource
b.Search Administration – /atg/bizui/activity/SearchingActivitySource
c.Personalization – /atg/web/personalization/activity/PersonalizationActivitySource
d.Merchanding – /atg/commerce/web/CommerceActivitySource
Each ActivitySource is associated with a sub-panel containing links to “generic activities”, which use specific URLs, and “workflow activity” links, which always present a page that allows the user to create a CA project that uses a workflow of a specific type. Each link is subject to access control, which is determined using activity configuration settings or workflow ACL settings.
To add a new link to the left navigation bar in BCC home page, follow the three steps, which are explained below:
1.Define A Custom Activity Source component
2.Define the Generic Activity Definition File
3.Register this new custom Activity Source with ActivityManager component
1.Define A Custom Activity Source component
Create a component that implement the atg.bizui.activity.ActivitySource interface. Here we use the OOTB atg.bizui.activity.PortalActivitySource class.
# /com/activity/SampleActivitySource
$class=atg.bizui.activity.PortalActivitySource
# The name and description for the entry that appears on the left side of the home page
activitySourceResourceBundle=org.com.webui.WebAppResources
activitySourceNameResource=activitySourceName
activitySourceDescriptionResource=activitySourceDescription
# Generic activity definitions
genericActivityDefinitionFiles=/com/activity/genericActivities.xml
genericActivityFileModificationInterval=every 300 seconds
securityConfiguration=/atg/dynamo/security/SecurityConfiguration
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
scheduler=/atg/dynamo/service/Scheduler
defaultCreateWorkflowURL=/atg/bcc/process?successURL=/AssetManager/assetManager.jsp
# Default URL for the main project page.
defaultProcessURL^=/atg/bizui/activity/PublishingActivitySource.defaultProcessURL
# Default URL for the workflow task page. All tasks use the AssetManager UI.
defaultTaskURL=/AssetManager/assetManager.jsp
fallbackPriority=2
2 – Define the Generic Activity Definition File
Now we need to create the genericActivities.xml file which is specified in the genericActivityDefinitionFiles property of the new ActivitySource component.
The genericActivities.xml file specifies the links on the left nav used for browsing repositories.
#/com/activity/genericActivities.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE gsa-template
PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
"http://www.atg.com/dtds/activitymanager/activitymanager_1.0.dtd">
<!-- This adds activity links to the "Non Versioned" section of the BCC home page -->
<generic-activities>
<!-- Add a link named "Edit My Sample Repository Items" -->
<activity>
<id>editSampleItems</id>
<resource-bundle>org.com.webui.WebAppResources</resource-bundle<display-name-resource>editSampleItems.displayName</display-name-resource>
<description-resource>editSampleItems.description</description-resource>
<destination-page>
<!-- This link takes the user to the AssetManager UI -->
<url>/AssetManager/assetManager.jsp</url!-- The clear-context flag clears any active Content Administration project references out of the user's session. -->
<clear-context>true</clear-context>
<!-- The ACL is optional. This ACL limits the visibility of this link to people with any of the epub roles. -->
<acl>Profile$role$epubAdmin:read;Profile$role$epubSuperAdmin:read;Profile$role$epubManager:read;Profile$role$epubUser:read</acl>
</destination-page>
</activity>
</generic-activities>
3 – Register this new Activity Source with ActivityManager
The path of the OOTB component is /atg/bizui/activity/ActivityManager
#/atg/bizui/activity/ActivityManager
activitySources+=/com/activity/SampleActivitySource
Implement a New List View
To add a new List View in BCC, follow the four steps, which are explained below:
1 – Create a View Configuration
Create a View Configuration component of class FilterableBrowseListViewConfiguration.
#/com/web/assetmanager/SampleItemViewConfiguration.properties
$class=atg.web.assetmanager.configuration.FilterableBrowseListViewConfiguration
# The path to the repository from which to draw the items
repositoryPath=/com/repository/test/MySampleRepository
# The type of items to display
assetTypeName=sampleItem
# what types the user is allowed to create in this view
createableTypesList=sampleItem
# how many items to show per page
itemsPerPage=50
Note:createableTypesList can refers multiple items separated by comma and shown these items as dropdown to create any new items.
We can refer the OOTB configuration for /atg/web/assetmanager/configuration/externalprofile/UserViewConfiguration as an example.
2 – Add the view to the task configuration file.
When the Business Control Center starts, the Task Configuration Manager component locates the default task configuration file, ‘taskConfiguration.xml‘, as well as any custom task configuration files you have created. The Task Configuration Manager parses the combined file, organizing the
information so that when a page is requested, the Business Control Center can determine what UI elements to display based on the current activity, task, or workflow.
In the task configuration file, configure the Tabs and Buttons for the new list view. Insert tags for modifying specified activity, task, or workflow configurations. You can make the following modifications:
a. Add support for new views, item types, or properties.
b. Remove existing tabs, buttons, views, item type, and properties.
c. Modify existing settings, such as the item types supported in the Search tab
# /atg/web/assetmanager/configuration/taskConfiguration.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE task-configuration
PUBLIC "-//Art Technology Group, Inc.//DTD Asset Manager Task Configuration//EN"
'http://www.atg.com/dtds/web/assetmanager/taskConfiguration_1.0.dtd'>
<task-configuration>
<!-- Define an activity for editing the My Sample repository -->
<activity id="editSampleItems" inherit-from="assetManager.defaultEdit">
<activity-name>editSampleItems</activity-name>
<!-- Configure the buttons on the toolbar -->
<operations>
<operation>create</operation>
<operation>delete</operation>
</operations>
<!-- Define tabs for the left pane -->
<tabs>
<tab-order>
<tab-id>browse</tab-id>
<tab-id>search</tab-id>
</tab-order>
<initial-tab>browse</initial-tab>
<!-- Configure the Browse tab with a list view of inventory items -->
<tab id="browse">
<display-name-resource>assetManager.tab.browse</display-name-resource<page>/browse/browseTab.jsp</page<views>
<view-order>
<view-id>editSampleItems.sampleItem</view-id>
</view-order>
<initial-view>editSampleItems.sampleItem</initial-view>
<view id="editSampleItems.sampleItem">
<resource-bundle>org.com.webui.WebAppResources</resource-bundle<display-name-resource>editSampleItem.browseTab.view.sampleItem</display-name-resource<configuration>/com/web/assetmanager/SampleItemViewConfiguration</configuration>
<page>/browse/list.jsp</page</view>
</views>
</tab>
<!-- Configure the Search tab to allow searching for inventory items -->
<tab id="search">
<display-name-resource>assetManager.tab.search</display-name-resource<page>/search/searchTab.jsp</page<views>
<initial-view>form</initial-view>
<view id="form">
<page>/search/searchForm.jsp</page<item-types>
<item-type>/com/repository/test/MySampleRepository:sampleItem</item-type>
</item-types>
</view>
<view id="results">
<page>/search/searchResults.jsp</page</view>
</views>
</tab>
</tabs>
</activity>
</task-configuration>
Note:As part of any tab, we can add either configuration file using configuration tag or we can directly mention repository and repository items.
<item-types>
<item-type>/xxx/xxxRepository:xxxevent</item-type>
</item-types>
And we use the following operation if we have requirements.
<operations>
<operation combine="remove">link</operation>
<operation combine="remove">unlink</operation>
</operations>
3 – Create services for the repository Item.
#/com/remote/controlcenter/service/sampleItems.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE application-configuration
PUBLIC "-//Art Technology Group, Inc.//DTD BCC Application Configuration //EN"
"http://www.atg.com/dtds/application-configuration/application-configuration_1.0.dtd">
<applications>
<application id="editSampleItems">
<resource-bundle>org.com.webui.WebAppResources</resource-bundle<display-name-resource>editSampleItems.displayName</display-name-resource>
<destination-page>
<url>/AssetManager/assetManager.jsp</url<query-parameter key="project" value="-1" />
<query-parameter key="activity" value="editSampleItems" />
</destination-page>
<acl>Profile$role$epubAdmin:read;Profile$role$epubSuperAdmin:read;Profile$role$epubManager:read;Profile$role$epubUser:read</acl>
<initializer>
</initializer>
<sort-priority>30</sort-priority>
<category>yourProjectExtras</category>
</application>
</applications>
Note: editSampleItems (id in genericActivities.xml file)So the same id should be used in services sampleItems.xml file ,genericeActivities.xml file. and taskConfiguration.xml
4 – Register your custom services to ApplicationConfigurationManager.
The path of the OOTB component is /atg/remote/controlcenter/service/ApplicationConfigurationManager
#/atg/remote/controlcenter/service/ApplicationConfigurationManager
applicationFiles+=/com/remote/controlcenter/service/sampleItems.xml
To Manage non-versioned repositories in BCC, we have to follow the below steps.
1)Setup the Repository in the Publishing Module.
2)Add new link to the left navigation bar in BCC home page.
3)Implement a New List View
4)Register Custom services with ApplicationConfigurationManager
Let us see all the steps in detailed manner.
1)Setup the Repository in the Publishing Module.
Create the required tables in the CORE (Production) schema. Configure the repository component in the Publishing module as shown below. Note that the component is created as an instance of GSARepository class and dataSource is pointing to production.
Sample code.
#/com/repository/test/MySampleRepository
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=MySampleRepository
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
dataSource=/atg/dynamo/service/jdbc/JTDataSource
definitionFiles=/com/repository/test/mySampleRepository.xm
2)Add new link to the left navigation bar in BCC home page.
The ActivityManager (/atg/bizui/activity/ActivityManager) component configures the left-side navigation panel on the BCC home page. Each section of the panel is defined by an element of the ActivityManager’s activitySources array. New sections can be added to the panel by appending ActivitySource to this array.
An activity source controls the links on the left nav on the BCC home screen. All activity sources are registered with the ActivityManager component (/atg/bizui/activity/ActivityManager). When rendering the home page, the ActivityManager cycles through all the registered ActivitySource components and displays left navigation links for each of them on the BCC home page.
OOTB ActivitySource components used in BCC
a. Content Administration – /atg/bizui/activity/PublishingActivitySource
b.Search Administration – /atg/bizui/activity/SearchingActivitySource
c.Personalization – /atg/web/personalization/activity/PersonalizationActivitySource
d.Merchanding – /atg/commerce/web/CommerceActivitySource
Each ActivitySource is associated with a sub-panel containing links to “generic activities”, which use specific URLs, and “workflow activity” links, which always present a page that allows the user to create a CA project that uses a workflow of a specific type. Each link is subject to access control, which is determined using activity configuration settings or workflow ACL settings.
To add a new link to the left navigation bar in BCC home page, follow the three steps, which are explained below:
1.Define A Custom Activity Source component
2.Define the Generic Activity Definition File
3.Register this new custom Activity Source with ActivityManager component
1.Define A Custom Activity Source component
Create a component that implement the atg.bizui.activity.ActivitySource interface. Here we use the OOTB atg.bizui.activity.PortalActivitySource class.
# /com/activity/SampleActivitySource
$class=atg.bizui.activity.PortalActivitySource
# The name and description for the entry that appears on the left side of the home page
activitySourceResourceBundle=org.com.webui.WebAppResources
activitySourceNameResource=activitySourceName
activitySourceDescriptionResource=activitySourceDescription
# Generic activity definitions
genericActivityDefinitionFiles=/com/activity/genericActivities.xml
genericActivityFileModificationInterval=every 300 seconds
securityConfiguration=/atg/dynamo/security/SecurityConfiguration
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
scheduler=/atg/dynamo/service/Scheduler
defaultCreateWorkflowURL=/atg/bcc/process?successURL=/AssetManager/assetManager.jsp
# Default URL for the main project page.
defaultProcessURL^=/atg/bizui/activity/PublishingActivitySource.defaultProcessURL
# Default URL for the workflow task page. All tasks use the AssetManager UI.
defaultTaskURL=/AssetManager/assetManager.jsp
fallbackPriority=2
2 – Define the Generic Activity Definition File
Now we need to create the genericActivities.xml file which is specified in the genericActivityDefinitionFiles property of the new ActivitySource component.
The genericActivities.xml file specifies the links on the left nav used for browsing repositories.
#/com/activity/genericActivities.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE gsa-template
PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
"http://www.atg.com/dtds/activitymanager/activitymanager_1.0.dtd">
<!-- This adds activity links to the "Non Versioned" section of the BCC home page -->
<generic-activities>
<!-- Add a link named "Edit My Sample Repository Items" -->
<activity>
<id>editSampleItems</id>
<resource-bundle>org.com.webui.WebAppResources</resource-bundle<display-name-resource>editSampleItems.displayName</display-name-resource>
<description-resource>editSampleItems.description</description-resource>
<destination-page>
<!-- This link takes the user to the AssetManager UI -->
<url>/AssetManager/assetManager.jsp</url!-- The clear-context flag clears any active Content Administration project references out of the user's session. -->
<clear-context>true</clear-context>
<!-- The ACL is optional. This ACL limits the visibility of this link to people with any of the epub roles. -->
<acl>Profile$role$epubAdmin:read;Profile$role$epubSuperAdmin:read;Profile$role$epubManager:read;Profile$role$epubUser:read</acl>
</destination-page>
</activity>
</generic-activities>
3 – Register this new Activity Source with ActivityManager
The path of the OOTB component is /atg/bizui/activity/ActivityManager
#/atg/bizui/activity/ActivityManager
activitySources+=/com/activity/SampleActivitySource
Implement a New List View
To add a new List View in BCC, follow the four steps, which are explained below:
1 – Create a View Configuration
Create a View Configuration component of class FilterableBrowseListViewConfiguration.
#/com/web/assetmanager/SampleItemViewConfiguration.properties
$class=atg.web.assetmanager.configuration.FilterableBrowseListViewConfiguration
# The path to the repository from which to draw the items
repositoryPath=/com/repository/test/MySampleRepository
# The type of items to display
assetTypeName=sampleItem
# what types the user is allowed to create in this view
createableTypesList=sampleItem
# how many items to show per page
itemsPerPage=50
Note:createableTypesList can refers multiple items separated by comma and shown these items as dropdown to create any new items.
We can refer the OOTB configuration for /atg/web/assetmanager/configuration/externalprofile/UserViewConfiguration as an example.
2 – Add the view to the task configuration file.
When the Business Control Center starts, the Task Configuration Manager component locates the default task configuration file, ‘taskConfiguration.xml‘, as well as any custom task configuration files you have created. The Task Configuration Manager parses the combined file, organizing the
information so that when a page is requested, the Business Control Center can determine what UI elements to display based on the current activity, task, or workflow.
In the task configuration file, configure the Tabs and Buttons for the new list view. Insert tags for modifying specified activity, task, or workflow configurations. You can make the following modifications:
a. Add support for new views, item types, or properties.
b. Remove existing tabs, buttons, views, item type, and properties.
c. Modify existing settings, such as the item types supported in the Search tab
# /atg/web/assetmanager/configuration/taskConfiguration.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE task-configuration
PUBLIC "-//Art Technology Group, Inc.//DTD Asset Manager Task Configuration//EN"
'http://www.atg.com/dtds/web/assetmanager/taskConfiguration_1.0.dtd'>
<task-configuration>
<!-- Define an activity for editing the My Sample repository -->
<activity id="editSampleItems" inherit-from="assetManager.defaultEdit">
<activity-name>editSampleItems</activity-name>
<!-- Configure the buttons on the toolbar -->
<operations>
<operation>create</operation>
<operation>delete</operation>
</operations>
<!-- Define tabs for the left pane -->
<tabs>
<tab-order>
<tab-id>browse</tab-id>
<tab-id>search</tab-id>
</tab-order>
<initial-tab>browse</initial-tab>
<!-- Configure the Browse tab with a list view of inventory items -->
<tab id="browse">
<display-name-resource>assetManager.tab.browse</display-name-resource<page>/browse/browseTab.jsp</page<views>
<view-order>
<view-id>editSampleItems.sampleItem</view-id>
</view-order>
<initial-view>editSampleItems.sampleItem</initial-view>
<view id="editSampleItems.sampleItem">
<resource-bundle>org.com.webui.WebAppResources</resource-bundle<display-name-resource>editSampleItem.browseTab.view.sampleItem</display-name-resource<configuration>/com/web/assetmanager/SampleItemViewConfiguration</configuration>
<page>/browse/list.jsp</page</view>
</views>
</tab>
<!-- Configure the Search tab to allow searching for inventory items -->
<tab id="search">
<display-name-resource>assetManager.tab.search</display-name-resource<page>/search/searchTab.jsp</page<views>
<initial-view>form</initial-view>
<view id="form">
<page>/search/searchForm.jsp</page<item-types>
<item-type>/com/repository/test/MySampleRepository:sampleItem</item-type>
</item-types>
</view>
<view id="results">
<page>/search/searchResults.jsp</page</view>
</views>
</tab>
</tabs>
</activity>
</task-configuration>
Note:As part of any tab, we can add either configuration file using configuration tag or we can directly mention repository and repository items.
<item-types>
<item-type>/xxx/xxxRepository:xxxevent</item-type>
</item-types>
And we use the following operation if we have requirements.
<operations>
<operation combine="remove">link</operation>
<operation combine="remove">unlink</operation>
</operations>
Register Custom services with ApplicationConfigurationManager
3 – Create services for the repository Item.
#/com/remote/controlcenter/service/sampleItems.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE application-configuration
PUBLIC "-//Art Technology Group, Inc.//DTD BCC Application Configuration //EN"
"http://www.atg.com/dtds/application-configuration/application-configuration_1.0.dtd">
<applications>
<application id="editSampleItems">
<resource-bundle>org.com.webui.WebAppResources</resource-bundle<display-name-resource>editSampleItems.displayName</display-name-resource>
<destination-page>
<url>/AssetManager/assetManager.jsp</url<query-parameter key="project" value="-1" />
<query-parameter key="activity" value="editSampleItems" />
</destination-page>
<acl>Profile$role$epubAdmin:read;Profile$role$epubSuperAdmin:read;Profile$role$epubManager:read;Profile$role$epubUser:read</acl>
<initializer>
</initializer>
<sort-priority>30</sort-priority>
<category>yourProjectExtras</category>
</application>
</applications>
Note: editSampleItems (id in genericActivities.xml file)So the same id should be used in services sampleItems.xml file ,genericeActivities.xml file. and taskConfiguration.xml
4 – Register your custom services to ApplicationConfigurationManager.
The path of the OOTB component is /atg/remote/controlcenter/service/ApplicationConfigurationManager
#/atg/remote/controlcenter/service/ApplicationConfigurationManager
applicationFiles+=/com/remote/controlcenter/service/sampleItems.xml
Now we can see the non versioned repository at BCC.
No comments:
Post a Comment