portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r731466 [1/12] - in /portals/jetspeed-2/portal/branches/JPA_BRANCH: ./ components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/ components/jetspeed-cm/src/main/java/org/apache/jetspeed/test/ components/jetspeed-page-manager/ com...
Date Mon, 05 Jan 2009 06:04:18 GMT
Author: rwatler
Date: Sun Jan  4 22:04:13 2009
New Revision: 731466

URL: http://svn.apache.org/viewvc?rev=731466&view=rev
Log:
JPA Persistence Implementation
------------------------------

- Initial JPA DBPM implementation.
- PM OM API change: renamed SecurityConstaints to SecurityConstraintsContext to avoid method name conflicts.
- Requires schema upgrade to add JPA sequence support and JPA_VERSION column to entity tables.
- Note: not yet integrated with portal spring configuration; JPA is active only during PM tests.


Added:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsContextImpl.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionElement.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionMetadata.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuDefinitionElementList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuDefinitionList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuExcludeDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuIncludeDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuMetadataLocalizedFieldImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuOptionsDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMenuSeparatorDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderMetadataLocalizedFieldImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderOrder.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderOrderList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderSecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderSecurityConstraintsRef.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/AbstractSecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentSecurityConstraintsContextImpl.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkSecurityConstraintsContextImpl.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsContextImpl.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsContextImpl.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/BaseElementImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/BaseMetadataLocalizedFieldImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/BaseSecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/BaseSecurityConstraintsRef.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FilteredFragmentList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentPreferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentPreferenceList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentPreferenceValue.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentPreferenceValueList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentPropertyMap.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentSecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/FragmentSecurityConstraintsRef.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/GenericSecurityConstraintsContextImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/LinkImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/LinkMetadataLocalizedFieldImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/LinkSecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/LinkSecurityConstraintsRef.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/MetadataLocalizedFieldCollection.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageBaseMenuDefinitionElement.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageBaseMenuDefinitionMetadata.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuDefinitionElementList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuDefinitionList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuExcludeDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuIncludeDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuMetadataLocalizedFieldImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuOptionsDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMenuSeparatorDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageMetadataLocalizedFieldImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecurityConstraintsDefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecurityConstraintsRef.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecurityConstraintsRefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecurityGlobalSecurityConstraintsRef.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecurityImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/PageSecuritySecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/SecurityConstraintDefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/SecurityConstraintList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/SecurityConstraintsContextImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/SecurityConstraintsDefImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/jpa/SecurityConstraintsRefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsContextImpl.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/jpa/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/jpa/DocumentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/jpa/NodeImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/jpa/NodeSetImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/DatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/DatabasePageManagerContext.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/DatabasePageManagerImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/DatabasePageManagerUtils.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/OpenJPADatabasePageManagerImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/jpa/OpenJPADatabasePageManagerProperties.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/resources/META-INF/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/resources/META-INF/persistence.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestOpenJPADatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestOpenJPATransactions.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureOpenJPADatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecurePermissionsOpenJPADatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/OpenJPADatabasePageManagerServer.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestOpenJPADatabasePageManagerCache.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/resources/jpa-database-page-manager.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/resources/openjpa-database-page-manager-base.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/resources/openjpa-database-page-manager.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/resources/secure-openjpa-database-page-manager.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/resources/secure-permissions-openjpa-database-page-manager.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/rdbms/jpa/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/rdbms/jpa/OpenJPAConfigurationProperties.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/SecurityConstraintsContext.java
      - copied, changed from r728362, portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/SecurityConstraints.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/ddl-schema/jpa-schema.xml
Removed:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/SecurityConstraints.java
Modified:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/test/JetspeedTestCase.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/pom.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionElementList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderOrderList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/MenuMetadataImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/ContentPageImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/PageMetadataImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FilteredFragmentList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceValueList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElementList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsDefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsRefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintDefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsDefImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsRefList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/AbstractBaseElement.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/PageImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsDefImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerSecurityUtils.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerUtils.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/DocumentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeSetImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/AbstractNode.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/castor/page-mapping.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureDatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecurePermissionsDatabasePageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestTransactions.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestDatabasePageManagerCache.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/test/resources/log4j.properties
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletAggregatorFragmentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseGetResourceAction.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/ContentFragmentTestImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/components/ComponentManagement.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/SecuredResource.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/ddl-schema/phase2-schema.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/ddl/mssql/create-schema.sql
    portals/jetspeed-2/portal/branches/JPA_BRANCH/pom.xml

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java Sun Jan  4 22:04:13 2009
@@ -271,4 +271,22 @@
         appContext.refresh();
         started = true;
     }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.components.ComponentManagement#createPrototypeComponent(java.lang.Object)
+     */
+    public Object createPrototypeComponent(Object componentName)
+    {
+        String name = ((componentName instanceof Class) ? ((Class) componentName).getName() : componentName.toString());
+        return appContext.getBeanFactory().getBean(name);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.components.ComponentManagement#destroyPrototypeComponent(java.lang.Object, java.lang.Object)
+     */
+    public void destroyPrototypeComponent(Object componentName, Object component)
+    {
+        String name = ((componentName instanceof Class) ? ((Class) componentName).getName() : componentName.toString());
+        appContext.getBeanFactory().destroyBean(name, component);
+    }
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/test/JetspeedTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/test/JetspeedTestCase.java?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/test/JetspeedTestCase.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-cm/src/main/java/org/apache/jetspeed/test/JetspeedTestCase.java Sun Jan  4 22:04:13 2009
@@ -28,6 +28,32 @@
  */
 public class JetspeedTestCase extends TestCase
 {
+    /**
+     * Generate test suit for class with specified tests in order.
+     * 
+     * @param testClass test suit class
+     * @param tests test suit test method names
+     * @return generated test suit
+     */
+    public static TestSuite createFixturedTestSuite(Class testClass, String [] tests)
+    {
+        // create test with specific tests run in order
+        TestSuite ts = new TestSuite();
+        for (int i = 0; (i < tests.length); i++)
+        {
+            ts.addTest(ts.createTest(testClass, tests[i]));
+        }
+        return ts;
+    }
+
+    /**
+     * Generate test suit for class with specified first and last tests.
+     * 
+     * @param testClass test suit class
+     * @param firstTest first test suit test method name or null
+     * @param lastTest last test suit test method name or null
+     * @return generated test suit
+     */
     public static TestSuite createFixturedTestSuite(Class testClass, String firstTest, String lastTest)
     {
         // All methods starting with "test" will automatically be executed in the test suite.

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/pom.xml?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/pom.xml (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/pom.xml Sun Jan  4 22:04:13 2009
@@ -84,6 +84,14 @@
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-persistence-jdbc</artifactId>
+        </dependency>        
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring</artifactId>
+        </dependency>    
         
         <!-- Test Dependencies -->
         <dependency>
@@ -176,6 +184,108 @@
                     </execution>
                 </executions>
             </plugin>
+ 	        <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>openjpa-maven-plugin</artifactId>
+                <version>1.0-alpha</version>
+                <executions>
+                    <execution>
+                        <id>org.apache.jetspeed.om.folder.jpa</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                        <configuration>
+                            <classes>${project.build.directory}/classes/org/apache/jetspeed/om/folder/jpa</classes>                   	  
+                            <toolProperties>                      	 
+                                <property>
+                                    <name>addDefaultConstructor</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>enforcePropertyRestrictions</name>
+                                    <value>true</value>
+                                </property>
+                            </toolProperties>
+                        </configuration>                  
+                    </execution>
+                    <execution>
+                        <id>org.apache.jetspeed.om.page.jpa</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                        <configuration>
+                            <classes>${project.build.directory}/classes/org/apache/jetspeed/om/page/jpa</classes>                   	  
+                            <toolProperties>                      	 
+                                <property>
+                                    <name>addDefaultConstructor</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>enforcePropertyRestrictions</name>
+                                    <value>true</value>
+                                </property>
+                            </toolProperties>
+                        </configuration>                  
+                    </execution>
+                    <execution>
+                        <id>org.apache.jetspeed.page.document.jpa</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                        <configuration>
+                            <classes>${project.build.directory}/classes/org/apache/jetspeed/page/document/jpa</classes>                   	  
+                            <toolProperties>                      	 
+                                <property>
+                                    <name>addDefaultConstructor</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>enforcePropertyRestrictions</name>
+                                    <value>true</value>
+                                </property>
+                            </toolProperties>
+                        </configuration>                  
+                    </execution>
+                    <execution>
+                        <id>org.apache.jetspeed.page.jpa</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                        <configuration>
+                            <classes>${project.build.directory}/classes/org/apache/jetspeed/page/jpa</classes>                   	  
+                            <toolProperties>                      	 
+                                <property>
+                                    <name>addDefaultConstructor</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>enforcePropertyRestrictions</name>
+                                    <value>true</value>
+                                </property>
+                            </toolProperties>
+                        </configuration>                  
+                    </execution>
+                </executions>
+                <dependencies>
+                    <!-- om objects implement jetspeed APIs -->
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>jetspeed-api</artifactId>
+                        <version>${pom.version}</version>
+                    </dependency>
+                    <!-- force upgrade of JPA for plugin -->
+                    <dependency>
+                        <groupId>org.apache.openjpa</groupId>
+                        <artifactId>openjpa-persistence-jdbc</artifactId>
+                        <version>${openjpa.version}</version>
+                        <scope>runtime</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
         </plugins>
     </build>
 </project>

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java Sun Jan  4 22:04:13 2009
@@ -18,12 +18,14 @@
 
 import java.security.AccessController;
 import java.security.Permission;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jetspeed.Jetspeed;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
@@ -51,6 +53,7 @@
 import org.apache.jetspeed.page.document.impl.NodeImpl;
 import org.apache.jetspeed.page.document.impl.NodeSetImpl;
 import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
+import org.apache.jetspeed.page.impl.DatabasePageManagerCache;
 import org.apache.jetspeed.security.PermissionFactory;
 import org.apache.ojb.broker.core.proxy.ProxyHelper;
 
@@ -62,6 +65,8 @@
  */
 public class FolderImpl extends NodeImpl implements Folder
 {
+    private static final Log log = LogFactory.getLog(FolderImpl.class);
+
     private String defaultPage;
     private String skin;
     private String defaultLayoutDecorator;
@@ -70,6 +75,7 @@
     private List menus;
 
     private PageManager pageManager;
+    private Object cacheLock;
     private List folders;
     private boolean foldersCached;
     private List pages;
@@ -98,7 +104,8 @@
     
     public FolderImpl()
     {
-        super(new FolderSecurityConstraintsImpl());
+        super(new FolderSecurityConstraintsContextImpl());
+        cacheLock = new Object();
     }
 
     /**
@@ -148,6 +155,16 @@
     }
 
     /**
+     * Access cache lock for used by PageManager to synchronize cached state.
+     *
+     * @return access cache lock
+     */
+    public Object accessCacheLock()
+    {
+        return cacheLock;
+    }
+
+    /**
      * accessFolders
      *
      * Access folders transient cache collection for use by PageManager.
@@ -156,12 +173,15 @@
      */
     public List accessFolders()
     {
-        // create initial collection if necessary
-        if (folders == null)
+        synchronized (cacheLock)
         {
-            folders = DatabasePageManagerUtils.createList();
+            // create initial collection if necessary
+            if (folders == null)
+            {
+                folders = new ArrayList();
+            }
+            return folders;
         }
-        return folders;
     }
 
     /**
@@ -173,20 +193,23 @@
      */
     public void resetFolders(boolean cached)
     {
-        // save cached state
-        foldersCached = cached;
-        allCached = false;
-
-        // update node caches
-        if (!cached)
+        synchronized (cacheLock)
         {
-            accessFolders().clear();
-        }
-        accessAll().clear();
+            // save cached state
+            foldersCached = cached;
+            allCached = false;
+
+            // update node caches
+            if (!cached)
+            {
+                accessFolders().clear();
+            }
+            accessAll().clear();
 
-        // reset cached node sets
-        foldersNodeSet = null;
-        allNodeSet = null;
+            // reset cached node sets
+            foldersNodeSet = null;
+            allNodeSet = null;
+        }
     }
 
     /**
@@ -198,12 +221,15 @@
      */
     public List accessPages()
     {
-        // create initial collection if necessary
-        if (pages == null)
+        synchronized (cacheLock)
         {
-            pages = DatabasePageManagerUtils.createList();
+            // create initial collection if necessary
+            if (pages == null)
+            {
+                pages = new ArrayList();
+            }
+            return pages;
         }
-        return pages;
     }
 
     /**
@@ -215,20 +241,23 @@
      */
     public void resetPages(boolean cached)
     {
-        // save cached state
-        pagesCached = cached;
-        allCached = false;
-
-        // update node caches
-        if (!cached)
+        synchronized (cacheLock)
         {
-            accessPages().clear();
-        }
-        accessAll().clear();
+            // save cached state
+            pagesCached = cached;
+            allCached = false;
 
-        // reset cached node sets
-        pagesNodeSet = null;
-        allNodeSet = null;
+            // update node caches
+            if (!cached)
+            {
+                accessPages().clear();
+            }
+            accessAll().clear();
+
+            // reset cached node sets
+            pagesNodeSet = null;
+            allNodeSet = null;
+        }
     }
 
     /**
@@ -240,12 +269,15 @@
      */
     public List accessLinks()
     {
-        // create initial collection if necessary
-        if (links == null)
+        synchronized (cacheLock)
         {
-            links = DatabasePageManagerUtils.createList();
+            // create initial collection if necessary
+            if (links == null)
+            {
+                links = new ArrayList();
+            }
+            return links;
         }
-        return links;
     }
 
     /**
@@ -257,20 +289,23 @@
      */
     public void resetLinks(boolean cached)
     {
-        // save cached state
-        linksCached = cached;
-        allCached = false;
-
-        // update node caches
-        if (!cached)
+        synchronized (cacheLock)
         {
-            accessLinks().clear();
-        }
-        accessAll().clear();
+            // save cached state
+            linksCached = cached;
+            allCached = false;
 
-        // reset cached node sets
-        linksNodeSet = null;
-        allNodeSet = null;
+            // update node caches
+            if (!cached)
+            {
+                accessLinks().clear();
+            }
+            accessAll().clear();
+
+            // reset cached node sets
+            linksNodeSet = null;
+            allNodeSet = null;
+        }
     }
 
     /**
@@ -282,7 +317,10 @@
      */
     public PageSecurityImpl accessPageSecurity()
     {
-        return pageSecurity;
+        synchronized (cacheLock)
+        {
+            return pageSecurity;
+        }
     }
 
     /**
@@ -295,16 +333,19 @@
      */
     public void resetPageSecurity(PageSecurityImpl newPageSecurity, boolean cached)
     {
-        // save cached state
-        pageSecurity = newPageSecurity;
-        pageSecurityCached = cached;
-        allCached = false;
+        synchronized (cacheLock)
+        {
+            // save cached state
+            pageSecurity = newPageSecurity;
+            pageSecurityCached = cached;
+            allCached = false;
 
-        // update node caches
-        accessAll().clear();
+            // update node caches
+            accessAll().clear();
 
-        // reset cached node sets
-        allNodeSet = null;
+            // reset cached node sets
+            allNodeSet = null;
+        }
     }
 
     /**
@@ -316,12 +357,15 @@
      */
     public List accessAll()
     {
-        // create initial collection if necessary
-        if (all == null)
+        synchronized (cacheLock)
         {
-            all = DatabasePageManagerUtils.createList();
+            // create initial collection if necessary
+            if (all == null)
+            {
+                all = new ArrayList();
+            }
+            return all;
         }
-        return all;
     }
 
     /**
@@ -333,23 +377,23 @@
      */
     public void resetAll(boolean cached)
     {
-        // save cached state
-        allCached = cached;
-        foldersCached = cached;
-        pagesCached = cached;
-        linksCached = cached;
-        pageSecurityCached = cached;
-
-        // update node caches
-        accessFolders().clear();
-        accessPages().clear();
-        accessLinks().clear();
-        pageSecurity = null;
-        if (cached)
+        synchronized (cacheLock)
         {
-            // populate node caches
-            synchronized(all)
+            // save cached state
+            allCached = cached;
+            foldersCached = cached;
+            pagesCached = cached;
+            linksCached = cached;
+            pageSecurityCached = cached;
+
+            // update node caches
+            accessFolders().clear();
+            accessPages().clear();
+            accessLinks().clear();
+            pageSecurity = null;
+            if (cached)
             {
+                // populate node caches
                 Iterator nodeIter = accessAll().iterator();
                 while (nodeIter.hasNext())
                 {
@@ -372,21 +416,22 @@
                     }
                 }
             }
-        }
-        else
-        {
-            accessAll().clear();
-        }
+            else
+            {
+                accessAll().clear();
+            }
 
-        // reset cached node sets
-        allNodeSet = null;
-        foldersNodeSet = null;
-        pagesNodeSet = null;
-        linksNodeSet = null;
+            // reset cached node sets
+            allNodeSet = null;
+            foldersNodeSet = null;
+            pagesNodeSet = null;
+            linksNodeSet = null;
+        }
     }
 
     /**
-     * createDocumentOrderComparator
+     * Create document order comparator,
+     * (assume cacheLock synchronized by caller).
      *
      * @return document order comparator
      */
@@ -404,65 +449,68 @@
             }
             // create new document order comparator
             documentOrderComparator = new Comparator()
+            {
+                /* (non-Javadoc)
+                 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+                 */
+                public int compare(Object o1, Object o2)
                 {
-                    /* (non-Javadoc)
-                     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-                     */
-                    public int compare(Object o1, Object o2)
+                    // Compare node names using document order;
+                    // use indices as names if found in document
+                    // order to force explicitly ordered items
+                    // ahead of unordered items
+                    String name1 = (String)o1;
+                    int index1 = documentOrder.indexOf(name1);
+                    if (index1 >= 0)
+                    {
+                        // use order index as name1
+                        name1 = String.valueOf(index1);
+                    }
+                    String name2 = (String)o2;
+                    int index2 = documentOrder.indexOf(name2);
+                    if (index2 >= 0)
                     {
-                        // Compare node names using document order;
-                        // use indicies as names if found in document
-                        // order to force explicitly ordered items
-                        // ahead of unordered items
-                        String name1 = (String)o1;
-                        int index1 = documentOrder.indexOf(name1);
+                        // use order index as name2
+                        name2 = String.valueOf(index2);
                         if (index1 >= 0)
                         {
-                            // use order index as name1
-                            name1 = String.valueOf(index1);
-                        }
-                        String name2 = (String)o2;
-                        int index2 = documentOrder.indexOf(name2);
-                        if (index2 >= 0)
-                        {
-                            // use order index as name2
-                            name2 = String.valueOf(index2);
-                            if (index1 >= 0)
+                            // pad order indices for numeric string compare
+                            while (name1.length() != name2.length())
                             {
-                                // pad order indicies for numeric string compare
-                                while (name1.length() != name2.length())
+                                if (name1.length() < name2.length())
                                 {
-                                    if (name1.length() < name2.length())
-                                    {
-                                        name1 = "0" + name1;
-                                    }
-                                    else
-                                    {
-                                        name2 = "0" + name2;
-                                    }
+                                    name1 = "0" + name1;
+                                }
+                                else
+                                {
+                                    name2 = "0" + name2;
                                 }
                             }
                         }
-                        // compare names and/or indicies
-                        return name1.compareTo(name2);                        
                     }
-                };
+                    // compare names and/or indices
+                    return name1.compareTo(name2);                        
+                }
+            };
         }
         return documentOrderComparator;
     }
 
     /**
-     * clearDocumentOrderComparator
+     * Clear cached document order comparator and related cached data.
      */
     void clearDocumentOrderComparator()
     {
-        // clear node set ordering
-        documentOrderComparatorValid = false;
-        documentOrderComparator = null;
-        // clear previously cached node sets
-        allNodeSet = null;
-        foldersNodeSet = null;
-        pagesNodeSet = null;
+        synchronized (cacheLock)
+        {
+            // clear node set ordering
+            documentOrderComparatorValid = false;
+            documentOrderComparator = null;
+            // clear previously cached node sets
+            allNodeSet = null;
+            foldersNodeSet = null;
+            pagesNodeSet = null;
+        }
     }
 
     /* (non-Javadoc)
@@ -481,25 +529,28 @@
     public PageSecurity getEffectivePageSecurity()
     {
         // return page security instance if available
-        if (!pageSecurityCached)
+        synchronized (cacheLock)
         {
-            // use PageManager to get and cache page security
-            // instance for this folder
-            try
-            {
-                return getPageManager().getPageSecurity(this);
-            }
-            catch (NodeException ne)
+            if (!pageSecurityCached)
             {
+                // use PageManager to get and cache page security
+                // instance for this folder
+                try
+                {
+                    return getPageManager().getPageSecurity(this);
+                }
+                catch (NodeException ne)
+                {
+                }
+                catch (NodeNotFoundException nnfe)
+                {
+                }
             }
-            catch (NodeNotFoundException nnfe)
+            else if (pageSecurity != null)
             {
+                return pageSecurity;
             }
         }
-        else if (pageSecurity != null)
-        {
-            return pageSecurity;
-        }
 
         // delegate to real parent folder implementation
         FolderImpl parentFolderImpl = (FolderImpl)ProxyHelper.getRealObject(getParent());
@@ -516,7 +567,7 @@
     public void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly) throws SecurityException
     {
         // check granted folder permissions unless the check is
-        // to be skipped due to explicity granted access
+        // to be skipped due to explicitly granted access
         if (!checkParentsOnly)
         {
             AccessController.checkPermission((Permission)pf.newPermission(pf.FOLDER_PERMISSION, path, mask));
@@ -679,16 +730,23 @@
      */
     public NodeSet getFolders() throws DocumentException
     {
-        // get folders collection
-        if (!foldersCached)
+        NodeSet nodes = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get and cache folders
-            // collection for this folder
-            return getPageManager().getFolders(this);
-        }
+            // get folders collection
+            if (!foldersCached)
+            {
+                // use PageManager to get and cache folders
+                // collection for this folder
+                return getPageManager().getFolders(this);
+            }
 
+            // return cached nodes
+            nodes = getFoldersNodeSet();
+        }
+        
         // return nodes with view access
-        return filterNodeSetByAccess(getFoldersNodeSet());
+        return filterNodeSetByAccess(nodes);
     }
     
     /* (non-Javadoc)
@@ -696,16 +754,20 @@
      */
     public Folder getFolder(String name) throws FolderNotFoundException, DocumentException
     {
-        // get folder instance if folders collection not available
-        if (!foldersCached)
+        Folder folder = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get folder instance without
-            // caching the folders collection for this folder
-            return getPageManager().getFolder(this, name);
-        }
+            // get folder instance if folders collection not available
+            if (!foldersCached)
+            {
+                // use PageManager to get folder instance without
+                // caching the folders collection for this folder
+                return getPageManager().getFolder(this, name);
+            }
 
-        // select folder by name from cached folders collection
-        Folder folder = (Folder)getFoldersNodeSet().get(name);
+            // select folder by name from cached folders collection
+            folder = (Folder)getFoldersNodeSet().get(name);
+        }
         if (folder == null)
         {
             throw new FolderNotFoundException("Folder not found: " + name);
@@ -722,16 +784,23 @@
      */
     public NodeSet getPages() throws NodeException
     {
-        // get pages collection
-        if (!pagesCached)
+        NodeSet nodes = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get and cache pages
-            // collection for this folder
-            return getPageManager().getPages(this);
+            // get pages collection
+            if (!pagesCached)
+            {
+                // use PageManager to get and cache pages
+                // collection for this folder
+                return getPageManager().getPages(this);
+            }
+
+            // return cached nodes
+            nodes = getPagesNodeSet();
         }
 
         // return nodes with view access
-        return filterNodeSetByAccess(getPagesNodeSet());
+        return filterNodeSetByAccess(nodes);
     }
     
     /* (non-Javadoc)
@@ -739,16 +808,20 @@
      */
     public Page getPage(String name) throws PageNotFoundException, NodeException
     {
-        // get page instance if pages collection not available
-        if (!pagesCached)
+        Page page = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get page instance without
-            // caching the pages collection for this folder
-            return getPageManager().getPage(this, name);
-        }
+            // get page instance if pages collection not available
+            if (!pagesCached)
+            {
+                // use PageManager to get page instance without
+                // caching the pages collection for this folder
+                return getPageManager().getPage(this, name);
+            }
 
-        // select page by name from cached pages collection
-        Page page = (Page)getPagesNodeSet().get(name);
+            // select page by name from cached pages collection
+            page = (Page)getPagesNodeSet().get(name);
+        }
         if (page == null)
         {
             throw new PageNotFoundException("Page not found: " + name);
@@ -765,16 +838,23 @@
      */
     public NodeSet getLinks() throws NodeException
     {
-        // get links collection
-        if (!linksCached)
+        NodeSet nodes = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get and cache links
-            // collection for this folder
-            return getPageManager().getLinks(this);
+            // get links collection
+            if (!linksCached)
+            {
+                // use PageManager to get and cache links
+                // collection for this folder
+                return getPageManager().getLinks(this);
+            }
+
+            // return cached nodes
+            nodes = getLinksNodeSet();
         }
 
         // return nodes with view access
-        return filterNodeSetByAccess(getLinksNodeSet());
+        return filterNodeSetByAccess(nodes);
     }
     
     /* (non-Javadoc)
@@ -782,16 +862,20 @@
      */
     public Link getLink(String name) throws DocumentNotFoundException, NodeException
     {
-        // get link instance if links collection not available
-        if (!linksCached)
+        Link link = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get link instance without
-            // caching the links collection for this folder
-            return getPageManager().getLink(this, name);
-        }
+            // get link instance if links collection not available
+            if (!linksCached)
+            {
+                // use PageManager to get link instance without
+                // caching the links collection for this folder
+                return getPageManager().getLink(this, name);
+            }
 
-        // select link by name from cached links collection
-        Link link = (Link)getLinksNodeSet().get(name);
+            // select link by name from cached links collection
+            link = (Link)getLinksNodeSet().get(name);
+        }
         if (link == null)
         {
             throw new DocumentNotFoundException("Link not found: " + name);
@@ -808,12 +892,17 @@
      */
     public PageSecurity getPageSecurity() throws DocumentNotFoundException, NodeException
     {
-        // get page security instance
-        if (!pageSecurityCached)
+        PageSecurity pageSecurity = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get and cache page security
-            // instance for this folder
-            return getPageManager().getPageSecurity(this);
+            // get page security instance
+            if (!pageSecurityCached)
+            {
+                // use PageManager to get and cache page security
+                // instance for this folder
+                return getPageManager().getPageSecurity(this);
+            }
+            pageSecurity = this.pageSecurity;
         }
         if (pageSecurity == null)
         {
@@ -831,16 +920,23 @@
      */
     public NodeSet getAll() throws DocumentException
     {
-        // get all nodes collection
-        if (!allCached)
+        NodeSet nodes = null;
+        synchronized (cacheLock)
         {
-            // use PageManager to get and cache all nodes
-            // collection for this folder
-            return getPageManager().getAll(this);
-        }
+            // get all nodes collection
+            if (!allCached)
+            {
+                // use PageManager to get and cache all nodes
+                // collection for this folder
+                return getPageManager().getAll(this);
+            }
 
+            // return cached nodes
+            nodes = getAllNodeSet();
+        }
+        
         // return nodes with view access
-        return filterNodeSetByAccess(getAllNodeSet());
+        return filterNodeSetByAccess(nodes);
     }
     
     /* (non-Javadoc)
@@ -947,7 +1043,8 @@
     /**
      * getFoldersNodeSet
      *
-     * Latently create and access folders node set.
+     * Latently create and access folders node set,
+     * (assume cacheLock synchronized by caller).
      *
      * @return folders node set
      */
@@ -970,7 +1067,8 @@
     /**
      * getPagesNodeSet
      *
-     * Latently create and access pages node set.
+     * Latently create and access pages node set,
+     * (assume cacheLock synchronized by caller).
      *
      * @return folders node set
      */
@@ -994,6 +1092,7 @@
      * getLinksNodeSet
      *
      * Latently create and access links node set.
+     * (assume cacheLock synchronized by caller).
      *
      * @return folders node set
      */
@@ -1016,7 +1115,8 @@
     /**
      * getAllNodeSet
      *
-     * Latently create and access all nodes node set.
+     * Latently create and access all nodes node set,
+     * (assume cacheLock synchronized by caller).
      *
      * @return all nodes node set
      */
@@ -1026,12 +1126,7 @@
         {
             if ((all != null) && !all.isEmpty())
             {
-                List allCopy = new java.util.ArrayList();
-                synchronized(all)
-                {
-                    allCopy.addAll(all); 
-                }
-                allNodeSet = new NodeSetImpl(allCopy, createDocumentOrderComparator());
+                allNodeSet = new NodeSetImpl(all, createDocumentOrderComparator());
             }
             else
             {
@@ -1105,11 +1200,26 @@
         return nodes;
     }
     
+    /**
+     * Return page manager infused by or accessed from cache.
+     * 
+     * @return cached/infused page manager
+     */
     public PageManager getPageManager()
     {
-        if(pageManager == null)
-        {
-            pageManager = (PageManager)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.page.PageManager");
+        // page manager should never be null, but there have been
+        // reports of this happening; normally this and other
+        // properties are configured by the cache, so access page
+        // manager and infuse other settings accordingly
+        if (pageManager == null)
+        {
+            // infuse PageManager
+            pageManager = DatabasePageManagerCache.getPageManager();
+            setConstraintsEnabled(pageManager.getConstraintsEnabled());
+            setPermissionsEnabled(pageManager.getPermissionsEnabled());
+            resetAll(false);
+            // log warning since this is unexpected
+            log.warn("Folder "+getPath()+" not managed: Folder operations probably invoked before Folder added to PageManager");
         }        
         return pageManager;
     }     

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionElementList.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionElementList.java?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionElementList.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionElementList.java Sun Jan  4 22:04:13 2009
@@ -55,7 +55,7 @@
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public synchronized void add(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -97,7 +97,7 @@
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public synchronized Object get(int index)
     {
         // implement for modifiable AbstractList
         return menuDefinition.accessElements().get(index);
@@ -106,7 +106,7 @@
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public synchronized Object remove(int index)
     {
         // implement for modifiable AbstractList
         return menuDefinition.accessElements().remove(index);
@@ -115,7 +115,7 @@
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public synchronized Object set(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // verify element
@@ -131,7 +131,7 @@
     /* (non-Javadoc)
      * @see java.util.List#size()
      */
-    public int size()
+    public synchronized int size()
     {
         // implement for modifiable AbstractList
         return menuDefinition.accessElements().size();

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionList.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionList.java?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionList.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionList.java Sun Jan  4 22:04:13 2009
@@ -17,10 +17,9 @@
 package org.apache.jetspeed.om.folder.impl;
 
 import java.util.AbstractList;
+import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
 /**
  * FolderMenuDefinitionList
  *
@@ -106,7 +105,7 @@
     {
         if (removedMenuDefinitions == null)
         {
-            removedMenuDefinitions = DatabasePageManagerUtils.createList();
+            removedMenuDefinitions = new ArrayList();
         }
         return removedMenuDefinitions;
     }
@@ -114,7 +113,7 @@
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public synchronized void add(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -131,7 +130,7 @@
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public synchronized Object get(int index)
     {
         // implement for modifiable AbstractList
         return folder.accessMenus().get(index);
@@ -140,7 +139,7 @@
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public synchronized Object remove(int index)
     {
         // implement for modifiable AbstractList:
         // save removed element 
@@ -155,7 +154,7 @@
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public synchronized Object set(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // verify menu definition
@@ -171,7 +170,7 @@
     /* (non-Javadoc)
      * @see java.util.List#size()
      */
-    public int size()
+    public synchronized int size()
     {
         // implement for modifiable AbstractList
         return folder.accessMenus().size();

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderOrderList.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderOrderList.java?rev=731466&r1=731465&r2=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderOrderList.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderOrderList.java Sun Jan  4 22:04:13 2009
@@ -17,10 +17,9 @@
 package org.apache.jetspeed.om.folder.impl;
 
 import java.util.AbstractList;
+import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
 /**
  * FolderOrderList
  *
@@ -85,7 +84,7 @@
     {
         if (removedFolderOrders == null)
         {
-            removedFolderOrders = DatabasePageManagerUtils.createList();
+            removedFolderOrders = new ArrayList();
         }
         return removedFolderOrders;
     }
@@ -93,7 +92,7 @@
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public synchronized void add(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -137,7 +136,7 @@
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public synchronized Object get(int index)
     {
         // implement for modifiable AbstractList:
         // unwrap folder order name string
@@ -147,7 +146,7 @@
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public synchronized Object remove(int index)
     {
         // implement for modifiable AbstractList
         FolderOrder removed = (FolderOrder)folder.accessFolderOrders().remove(index);
@@ -164,7 +163,7 @@
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public synchronized Object set(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // wrap and verify folder order name string
@@ -184,7 +183,7 @@
     /* (non-Javadoc)
      * @see java.util.List#size()
      */
-    public int size()
+    public synchronized int size()
     {
         // implement for modifiable AbstractList
         return folder.accessFolderOrders().size();

Copied: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsContextImpl.java (from r728362, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsImpl.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsContextImpl.java?p2=portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsContextImpl.java&p1=portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsImpl.java&r1=728362&r2=731466&rev=731466&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderSecurityConstraintsContextImpl.java Sun Jan  4 22:04:13 2009
@@ -16,18 +16,18 @@
  */
 package org.apache.jetspeed.om.folder.impl;
 
-import org.apache.jetspeed.om.page.impl.SecurityConstraintsImpl;
+import org.apache.jetspeed.om.page.impl.SecurityConstraintsContextImpl;
 
 /**
- * FolderSecurityConstraintsImpl
+ * FolderSecurityConstraintsContextImpl
  *
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public class FolderSecurityConstraintsImpl extends SecurityConstraintsImpl
+public class FolderSecurityConstraintsContextImpl extends SecurityConstraintsContextImpl
 {
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.page.impl.SecurityConstraintsImpl#getSecurityConstraintClass()
+     * @see org.apache.jetspeed.om.page.impl.SecurityConstraintsContextImpl#getSecurityConstraintClass()
      */
     public Class getSecurityConstraintClass()
     {
@@ -35,7 +35,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.page.impl.SecurityConstraintsImpl#getSecurityConstraintsRefClass()
+     * @see org.apache.jetspeed.om.page.impl.SecurityConstraintsContextImpl#getSecurityConstraintsRefClass()
      */
     public Class getSecurityConstraintsRefClass()
     {

Added: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionElement.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionElement.java?rev=731466&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionElement.java (added)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionElement.java Sun Jan  4 22:04:13 2009
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.om.folder.jpa;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.DiscriminatorColumn;
+import javax.persistence.FetchType;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Version;
+
+/**
+ * FolderBaseMenuDefinitionElement
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+@Entity
+@Inheritance (strategy=InheritanceType.SINGLE_TABLE)
+@Table (name="FOLDER_MENU")
+@DiscriminatorColumn (name="CLASS_NAME")
+public abstract class FolderBaseMenuDefinitionElement
+{
+    @Id
+    @GeneratedValue (strategy=GenerationType.AUTO)
+    @Column (name="MENU_ID")
+    private int id;
+    @Version
+    @Column (name="JPA_VERSION")
+    private int jpaVersion;
+    @ManyToOne (targetEntity=FolderMenuDefinitionImpl.class, fetch=FetchType.LAZY, optional=true)
+    @JoinColumn (name="PARENT_ID", referencedColumnName="MENU_ID")
+    private FolderMenuDefinitionImpl parent;
+    @Basic
+    @Column (name="ELEMENT_ORDER")
+    private int elementOrder;    
+
+    /**
+     * Explicitly set inverse relationship when this object
+     * is added to a one-to-many collection. JPA does not
+     * manage bidirectional relationships.
+     * 
+     * @param inverse inverse relationship owning object.
+     */
+    public void setInverseRelationship(Object inverse)
+    {
+        parent = (FolderMenuDefinitionImpl)inverse;
+    }
+    
+    /**
+     * getElementOrder
+     *
+     * @return element order
+     */
+    public int getElementOrder()
+    {
+        return elementOrder;
+    }
+
+    /**
+     * setElementOrder
+     *
+     * @param order element order
+     */
+    public void setElementOrder(int order)
+    {
+        elementOrder = order;
+    }
+}

Added: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionMetadata.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionMetadata.java?rev=731466&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionMetadata.java (added)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/jpa/FolderBaseMenuDefinitionMetadata.java Sun Jan  4 22:04:13 2009
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.om.folder.jpa;
+
+import java.util.Collection;
+import java.util.Locale;
+
+import javax.persistence.CascadeType;
+import javax.persistence.DiscriminatorColumn;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.OneToMany;
+import javax.persistence.PostLoad;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.apache.jetspeed.om.page.PageMetadataImpl;
+import org.apache.jetspeed.om.page.jpa.MetadataLocalizedFieldCollection;
+import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
+
+/**
+ * FolderBaseMenuDefinitionMetadata
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+@Entity
+@Inheritance (strategy=InheritanceType.SINGLE_TABLE)
+@Table (name="FOLDER_MENU")
+@DiscriminatorColumn (name="CLASS_NAME")
+public abstract class FolderBaseMenuDefinitionMetadata extends FolderBaseMenuDefinitionElement 
+{
+    @OneToMany (targetEntity=FolderMenuMetadataLocalizedFieldImpl.class, mappedBy="menu", fetch=FetchType.LAZY, cascade=CascadeType.ALL)
+    private Collection metadataFields;
+
+    @PostLoad
+    private void eagerFetchCollections()
+    {
+        if (metadataFields != null)
+        {
+            metadataFields.size();
+        }
+    }    
+
+    @Transient
+    private PageMetadataImpl pageMetadata;
+
+    /**
+     * newPageMetadata
+     *
+     * Construct page manager specific metadata implementation.
+     *
+     * @param fields mutable fields collection
+     * @return page metadata
+     */
+    public abstract PageMetadataImpl newPageMetadata(Collection fields);
+
+    /**
+     * getPageMetadata
+     *
+     * Get page manager specific metadata implementation.
+     *
+     * @return page metadata
+     */
+    public PageMetadataImpl getPageMetadata()
+    {
+        if (pageMetadata == null)
+        {
+            if (metadataFields == null)
+            {
+                metadataFields = DatabasePageManagerUtils.createList();
+            }
+            pageMetadata = newPageMetadata(new MetadataLocalizedFieldCollection(this, metadataFields));
+        }
+        return pageMetadata;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuDefinition#getTitle()
+     * @see org.apache.jetspeed.om.folder.MenuSeparatorDefinition#getTitle()
+     */
+    public String getTitle()
+    {
+        // no title available by default
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuDefinition#getShortTitle()
+     */
+    public String getShortTitle()
+    {
+        // no short title available by default
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuSeparatorDefinition#getText()
+     */
+    public String getText()
+    {
+        // no text available by default
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuDefinition#getTitle(java.util.Locale)
+     * @see org.apache.jetspeed.om.folder.MenuSeparatorDefinition#getTitle(java.util.Locale)
+     */
+    public String getTitle(Locale locale)
+    {
+        // get title from metadata or use default title
+        String title = getPageMetadata().getText("title", locale);
+        if (title == null)
+        {
+            title = getTitle();
+        }
+        return title;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuDefinition#getShortTitle(java.util.Locale)
+     */
+    public String getShortTitle(Locale locale)
+    {
+        // get short title from metadata or use title from metadata,
+        // default short title, or default title
+        String shortTitle = getPageMetadata().getText("short-title", locale);
+        if (shortTitle == null)
+        {
+            shortTitle = getPageMetadata().getText("title", locale);
+            if (shortTitle == null)
+            {
+                shortTitle = getShortTitle();
+                if (shortTitle == null)
+                {
+                    shortTitle = getTitle();
+                }
+            }
+        }
+        return shortTitle;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuSeparatorDefinition#getText(java.util.Locale)
+     */
+    public String getText(Locale locale)
+    {
+        // get title from metadata or use default title
+        String text = getPageMetadata().getText("text", locale);
+        if (text == null)
+        {
+            text = getText();
+        }
+        return text;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.folder.MenuDefinition#getMetadata()
+     * @see org.apache.jetspeed.om.folder.MenuSeparatorDefinition#getMetadata()
+     */
+    public GenericMetadata getMetadata()
+    {
+        return getPageMetadata();
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message