|
Author: doogie
Date: Fri Dec 10 02:40:02 2010 New Revision: 1044202 URL: http://svn.apache.org/viewvc?rev=1044202&view=rev Log: Set svn:eol-style properly on all java files. This needs to be done on other text files as well, but that would cause undo conflicts in the jquery branch(due to .js being heavily modified there). Also, some files were committed to the repository with DOS line endings; those are fixed as well. Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java (props changed) ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java (props changed) ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java (props changed) ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java (props changed) ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java (props changed) ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java (props changed) ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java (props changed) ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (props changed) ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogUrlTransform.java (props changed) ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java (props changed) ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/da/ServiceDaHandler.java (props changed) ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/test/AuthorizationTests.java (props changed) ofbiz/trunk/debian/EncryptPassword.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/DependencyPool.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/GeneratedResult.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLCachedObject.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/AsyncTTLObjectTest.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/DependencyPoolTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/SyncTTLObjectTest.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/TTLCachedObjectTest.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/TTLObjectTest.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/config/CoberturaInstrumenter.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/GenericSingletonToList.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/GenericSingletonToSet.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/JSONConverters.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/JSONResult.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NetConverters.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSONWriter.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/json/test/JSONTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/IsEmpty.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/LockedBy.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/ObjectWrapper.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/SourceMonitored.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/test/ComparableRangeTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/test/GenericTestCaseBase.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/IndentingWriter.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/RMIExtendedSocketFactory.java (contents, props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ReferenceCleaner.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMap.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapCollection.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapEntry.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapEntrySet.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapKeySet.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapSet.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapValues.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/IteratorWrapper.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapContext.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ReadOnlyMapEntry.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/test/FlexibleMapAccessorTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/test/GenericMapTest.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/ReferenceCleanerTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java (props changed) ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/UtilObjectTests.java (props changed) ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java (props changed) ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthenticationComparator.java (props changed) ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/api/Authenticator.java (props changed) ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/api/AuthenticatorException.java (props changed) ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/example/TestFailAuthenticator.java (props changed) ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/example/TestPassAuthenticator.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityConditionPlanner.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityDeletePlan.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityInsertPlan.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntitySelectPlan.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityUpdatePlan.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityViewPlan.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java (props changed) ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/CachedClassLoaderInit.java (props changed) ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/AbstractAuthorization.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/Authorization.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/AuthorizationFactory.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/EntityAuthorization.java (contents, props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/DynamicAccess.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/DynamicAccessFactory.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/DynamicAccessHandler.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/GroovyDaHandler.java (props changed) ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/ObjectDaHandler.java (props changed) ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericInvoker.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/AggregateFunction.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Atom.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BetweenCondition.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConditionList.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConditionPlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConditionPlanner.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConstantValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/CountAllFunction.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/DeletePlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldAll.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FunctionCall.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertPlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertRow.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertSource.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertValues.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Joined.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Joiner.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/KeyMap.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Main.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/OrderByItem.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ParameterValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ParameterizedConditionException.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Relation.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLDelete.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLIndex.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLInsert.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLPlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLSelect.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLUpdate.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLView.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectPlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SetField.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/StaticValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/StringValue.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Table.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/TableName.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Unioned.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/UpdatePlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ViewPlan.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/ConditionsTest.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/Recorder.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/SQLTest.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/SelectTest.java (props changed) ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/ValuesTest.java (props changed) ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Instrumenter.java (props changed) ofbiz/trunk/framework/start/src/org/ofbiz/base/start/InstrumenterWorker.java (props changed) ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestListContainer.java (props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java (contents, props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizComponentProvider.java (contents, props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizHomeProvider.java (contents, props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/EntityHttpUtil.java (contents, props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/EntityTransactionUtil.java (props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java (contents, props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java (props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java (props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContainer.java (props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java (contents, props changed) ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java (contents, props changed) ofbiz/trunk/framework/widget/src/org/ofbiz/widget/PortalPageWorker.java (contents, props changed) ofbiz/trunk/framework/widget/src/org/ofbiz/widget/PortalPageWorkerInterface.java (contents, props changed) ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetPortalPageWorker.java (contents, props changed) ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java (contents, props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/authentication/ApplicationAuthenticationContext.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/authentication/AuthenticatedToken.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/authentication/PasswordCredential.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/authentication/PrincipalAuthenticationContext.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/authentication/ValidationFactor.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/ApplicationAccessDeniedException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/ApplicationPermissionException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InactiveAccountException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidAuthenticationException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidAuthorizationTokenException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidCredentialException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidGroupException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidPrincipalException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidRoleException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/InvalidTokenException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/exception/ObjectNotFoundException.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SOAPAttribute.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SOAPCookieInfo.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SOAPGroup.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SOAPNestableGroup.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SOAPPrincipal.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SOAPRole.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/com/atlassian/crowd/integration/soap/SearchRestriction.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/CrowdAuthenticator.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/CrowdWorker.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/security/SecurityServer.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/security/SecurityServerHttpBindingStub.java (contents, props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/security/SecurityServerLocator.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/security/SecurityServerPortType.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/user/UserAttributeMapper.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/user/UserGroupMapper.java (props changed) ofbiz/trunk/specialpurpose/crowd/src/org/ofbiz/crowd/user/UserWrapper.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayAccount.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayBestOfferAutoPref.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayFeedback.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCustomerService.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOrder.java (props changed) ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java (props changed) ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PromoStatusBar.java (contents, props changed) ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java (contents, props changed) Propchange: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogUrlTransform.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/da/ServiceDaHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/test/AuthorizationTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/debian/EncryptPassword.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/DependencyPool.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/GeneratedResult.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLCachedObject.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/AsyncTTLObjectTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/DependencyPoolTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/SyncTTLObjectTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/TTLCachedObjectTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/test/TTLObjectTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/CoberturaInstrumenter.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/GenericSingletonToList.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/GenericSingletonToSet.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/JSONConverters.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/JSONResult.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NetConverters.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSONWriter.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/json/test/JSONTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/IsEmpty.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/LockedBy.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/ObjectWrapper.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/SourceMonitored.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/lang/test/ComparableRangeTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/test/GenericTestCaseBase.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/IndentingWriter.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/RMIExtendedSocketFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/RMIExtendedSocketFactory.java?rev=1044202&r1=1044201&r2=1044202&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/RMIExtendedSocketFactory.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/RMIExtendedSocketFactory.java Fri Dec 10 02:40:02 2010 @@ -1,104 +1,104 @@ -/******************************************************************************* - * 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.ofbiz.base.util; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.Socket; -import java.net.UnknownHostException; -import java.rmi.server.RMISocketFactory; - -/** - * A <code>RMISocketFactory</code> implementation that creates <code>ServerSocket</code>s bound - * on a specified network interface. - */ -public class RMIExtendedSocketFactory extends RMISocketFactory { - - /** - * The network interface to bind the <code>ServerSocket</code> to. If null than bind to all interfaces. - */ - private InetAddress hostInetAddress; - - /** - * Default constructor. Bind the server sockets on all interfaces. - */ - public RMIExtendedSocketFactory() { - // leave hostInetAddress null - } - - /** - * Creates a new <code>RMIExtendedSocketFactory</code> which will create <code>ServerSocket</code>s - * bound on the specified network interface. - * - * @param inetAddress The <code>InetAddress</code> of the network interface. - */ - public RMIExtendedSocketFactory( InetAddress inetAddress ) { - this.hostInetAddress = inetAddress; - } - - /** - * Creates a new <code>RMIExtendedSocketFactory</code> which will create <code>ServerSocket</code>s - * bound on the specified network interface. - * - * @param hostIpAddress The IP address of the interface to bind the server sockets to. - * @throws UnknownHostException If an invalid IP address is provided. - */ - public RMIExtendedSocketFactory( String hostIpAddress ) throws UnknownHostException { - - // check if host length is at least equal to "0.0.0.0" - if ( hostIpAddress != null && hostIpAddress.length() >= 7 ) { - String[] octets = hostIpAddress.split( "\\." ); - - if ( octets == null || octets.length != 4 ) { - throw new UnknownHostException( "Invalid IP address: " + hostIpAddress ); - } - - byte[] ipAddr = new byte[4]; - for ( int i = 0; i < octets.length; i++ ) { - try { - ipAddr[i] = ( byte ) Integer.parseInt( octets[i] ); - } catch ( NumberFormatException nfEx ) { - throw new UnknownHostException( "Invalid IP address: " + hostIpAddress ); - } - } - - hostInetAddress = InetAddress.getByAddress( ipAddr ); - - } - - - } - - @Override - public ServerSocket createServerSocket(int port) throws IOException { - if ( hostInetAddress != null ) { - return new ServerSocket( port, 0, hostInetAddress ); - } else { - return new ServerSocket( port ); - } - } - - @Override - public Socket createSocket(String host, int port) throws IOException { - - return new Socket( host, port ); - } - -} +/******************************************************************************* + * 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.ofbiz.base.util; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.UnknownHostException; +import java.rmi.server.RMISocketFactory; + +/** + * A <code>RMISocketFactory</code> implementation that creates <code>ServerSocket</code>s bound + * on a specified network interface. + */ +public class RMIExtendedSocketFactory extends RMISocketFactory { + + /** + * The network interface to bind the <code>ServerSocket</code> to. If null than bind to all interfaces. + */ + private InetAddress hostInetAddress; + + /** + * Default constructor. Bind the server sockets on all interfaces. + */ + public RMIExtendedSocketFactory() { + // leave hostInetAddress null + } + + /** + * Creates a new <code>RMIExtendedSocketFactory</code> which will create <code>ServerSocket</code>s + * bound on the specified network interface. + * + * @param inetAddress The <code>InetAddress</code> of the network interface. + */ + public RMIExtendedSocketFactory( InetAddress inetAddress ) { + this.hostInetAddress = inetAddress; + } + + /** + * Creates a new <code>RMIExtendedSocketFactory</code> which will create <code>ServerSocket</code>s + * bound on the specified network interface. + * + * @param hostIpAddress The IP address of the interface to bind the server sockets to. + * @throws UnknownHostException If an invalid IP address is provided. + */ + public RMIExtendedSocketFactory( String hostIpAddress ) throws UnknownHostException { + + // check if host length is at least equal to "0.0.0.0" + if ( hostIpAddress != null && hostIpAddress.length() >= 7 ) { + String[] octets = hostIpAddress.split( "\\." ); + + if ( octets == null || octets.length != 4 ) { + throw new UnknownHostException( "Invalid IP address: " + hostIpAddress ); + } + + byte[] ipAddr = new byte[4]; + for ( int i = 0; i < octets.length; i++ ) { + try { + ipAddr[i] = ( byte ) Integer.parseInt( octets[i] ); + } catch ( NumberFormatException nfEx ) { + throw new UnknownHostException( "Invalid IP address: " + hostIpAddress ); + } + } + + hostInetAddress = InetAddress.getByAddress( ipAddr ); + + } + + + } + + @Override + public ServerSocket createServerSocket(int port) throws IOException { + if ( hostInetAddress != null ) { + return new ServerSocket( port, 0, hostInetAddress ); + } else { + return new ServerSocket( port ); + } + } + + @Override + public Socket createSocket(String host, int port) throws IOException { + + return new Socket( host, port ); + } + +} Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/RMIExtendedSocketFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ReferenceCleaner.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMap.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapCollection.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapEntry.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapEntrySet.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapKeySet.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapSet.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/GenericMapValues.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/IteratorWrapper.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapContext.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ReadOnlyMapEntry.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/test/FlexibleMapAccessorTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/test/GenericMapTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/ReferenceCleanerTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/UtilObjectTests.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthenticationComparator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/api/Authenticator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/api/AuthenticatorException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/example/TestFailAuthenticator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/example/TestPassAuthenticator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityConditionPlanner.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityDeletePlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityInsertPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntitySelectPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityUpdatePlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityViewPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/CachedClassLoaderInit.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/AbstractAuthorization.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/Authorization.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/AuthorizationFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/EntityAuthorization.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/EntityAuthorization.java?rev=1044202&r1=1044201&r2=1044202&view=diff ============================================================================== --- ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/EntityAuthorization.java (original) +++ ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/EntityAuthorization.java Fri Dec 10 02:40:02 2010 @@ -1,208 +1,208 @@ -/******************************************************************************* - * 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.ofbiz.security.authz; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpSession; - -import javolution.util.FastList; - -import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.GenericEntityException; -import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.cache.Cache; -import org.ofbiz.entity.condition.EntityCondition; -import org.ofbiz.entity.util.EntityUtil; -import org.ofbiz.security.authz.da.DynamicAccessFactory; -import org.ofbiz.security.authz.da.DynamicAccessHandler; - -public class EntityAuthorization extends AbstractAuthorization { - - private static final String module = EntityAuthorization.class.getName(); - - protected Delegator delegator; - - @Override - public List<String> getAutoGrantPermissions(String userId, String permission, Map<String, ? extends Object> context) { - if (Debug.verboseOn()) Debug.logVerbose("Running getAutoGrantPermissions()", module); - boolean checking = true; - String checkString = permission; - - while (checking) { - if (Debug.verboseOn()) Debug.logVerbose("Looking for auto-grant permissions for : " + checkString, module); - List<String> autoGrant = getPermissionAutoGrant(checkString); - if (UtilValidate.isNotEmpty(autoGrant)) { - return autoGrant; - } - if (checkString.indexOf(":") > -1) { - checkString = checkString.substring(0, checkString.lastIndexOf(":")); - } else { - checking = false; - } - } - return null; - } - - @Override - public boolean hasDynamicPermission(String userId, String permission, Map<String, ? extends Object> context) { - if (Debug.verboseOn()) Debug.logVerbose("Running hasDynamicPermission()", module); - String permissionId = permission; - boolean checking = true; - - // find the dynamic access implementation - String dynamicAccess = null; - while (checking) { - if (Debug.verboseOn()) Debug.logVerbose("Looking for dynamic access for permission -- " + permissionId, module); - dynamicAccess = getPermissionDynamicAccess(permissionId); - if (UtilValidate.isEmpty(dynamicAccess)) { - if (permissionId.indexOf(":") > -1) { - permissionId = permissionId.substring(0, permissionId.lastIndexOf(":")); - } else { - Debug.logVerbose("No sections left to check; no dynamic access implementation found", module); - checking = false; - } - } else { - if (Debug.verboseOn()) Debug.logVerbose("Dynamic access implementation found : " + dynamicAccess, module); - checking = false; - } - } - - // if one exists invoke it - if (UtilValidate.isNotEmpty(dynamicAccess)) { - // load the dynamic access handler and invoke it - if (Debug.verboseOn()) Debug.logVerbose("Loading DynamicAccessHandler for -- " + dynamicAccess, module); - DynamicAccessHandler dah = DynamicAccessFactory.getDynamicAccessHandler(delegator, dynamicAccess); - if (dah != null) { - if (Debug.verboseOn()) Debug.logVerbose("Calling DynamicAccessHandler : " + dah.getClass().getName(), module); - return dah.handleDynamicAccess(dynamicAccess, userId, permission, context); - } else { - if (Debug.verboseOn()) { - Debug.logVerbose("No DynamicAccessHandler found for pattern matching -- " + dynamicAccess, module); - } - } - } - return false; - } - - @Override - public boolean hasStaticPermission(String userId, String permission, Map<String, ? extends Object> context) { - if (Debug.verboseOn()) Debug.logVerbose("Running hasStaticPermission()", module); - Iterator<GenericValue> iterator = getUserLoginSecurityGroupByUserLoginId(userId); - GenericValue userLoginSecurityGroup = null; - - while (iterator.hasNext()) { - userLoginSecurityGroup = iterator.next(); - if (securityGroupHasPermission(userLoginSecurityGroup.getString("groupId"), permission)) { - return true; - } - } - return false; - } - - /** - * Test to see if the specified user has permission - * - * @param session HttpSession used to obtain the userId - * @param permission the raw permission string - * @param context name/value pairs used for permission lookup - * @return true if the user has permission - */ - public boolean hasPermission(HttpSession session, String permission, Map<String, ? extends Object> context) { - GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); - if (userLogin != null) { - return hasPermission(userLogin.getString("userLoginId"), permission, context); - } - return false; - } - - public void setDelegator(Delegator delegator) { - this.delegator = delegator; - } - - private Iterator<GenericValue> getUserLoginSecurityGroupByUserLoginId(String userId) { - List<GenericValue> collection; - - try { - collection = delegator.findByAnd("UserLoginSecurityGroup", UtilMisc.toMap("userLoginId", userId), null); - } catch (GenericEntityException e) { - // make an empty collection to speed up the case where a userLogin belongs to no security groups, only with no exception of course - collection = FastList.newInstance(); - Debug.logWarning(e, module); - } - - // filter each time after cache retrieval, i.e. cache will contain entire list - collection = EntityUtil.filterByDate(collection, true); - return collection.iterator(); - } - - private boolean securityGroupHasPermission(String groupId, String permission) { - GenericValue securityGroupPermissionValue = delegator.makeValue("SecurityGroupPermission", - UtilMisc.toMap("groupId", groupId, "permissionId", permission)); - - try { - return delegator.findOne(securityGroupPermissionValue.getEntityName(), securityGroupPermissionValue, false) != null; - } catch (GenericEntityException e) { - Debug.logWarning(e, module); - return false; - } - } - - private List<String> getPermissionAutoGrant(String permission) { - Cache cache = delegator.getCache(); - EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toMap("permissionId", permission)); - List<String> autoGrants = cache.get("SecurityPermissionAutoGrant", condition, "EntityAuthorization.autoGrants"); - if (autoGrants == null) { - autoGrants = FastList.newInstance(); - - List<GenericValue> values = null; - try { - values = delegator.findList("SecurityPermissionAutoGrant", condition, null, null, null, true); - } catch (GenericEntityException e) { - Debug.logWarning(e, module); - } - - if (UtilValidate.isNotEmpty(values)) { - for (GenericValue v : values) { - autoGrants.add(v.getString("grantPermission")); - } - } - cache.put("SecurityPermissionAutoGrant", condition, "EntityAuthorization.autoGrants", autoGrants); - } - return autoGrants; - } - - private String getPermissionDynamicAccess(String perm) { - GenericValue permission = null; - try { - permission = delegator.findOne("SecurityPermission", UtilMisc.toMap("permissionId", perm), true); - } catch (GenericEntityException e) { - Debug.logWarning(e, module); - } - if (permission != null) { - return permission.getString("dynamicAccess"); - } - return null; - } -} +/******************************************************************************* + * 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.ofbiz.security.authz; + +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +import javolution.util.FastList; + +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilValidate; +import org.ofbiz.entity.Delegator; +import org.ofbiz.entity.GenericEntityException; +import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.cache.Cache; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.util.EntityUtil; +import org.ofbiz.security.authz.da.DynamicAccessFactory; +import org.ofbiz.security.authz.da.DynamicAccessHandler; + +public class EntityAuthorization extends AbstractAuthorization { + + private static final String module = EntityAuthorization.class.getName(); + + protected Delegator delegator; + + @Override + public List<String> getAutoGrantPermissions(String userId, String permission, Map<String, ? extends Object> context) { + if (Debug.verboseOn()) Debug.logVerbose("Running getAutoGrantPermissions()", module); + boolean checking = true; + String checkString = permission; + + while (checking) { + if (Debug.verboseOn()) Debug.logVerbose("Looking for auto-grant permissions for : " + checkString, module); + List<String> autoGrant = getPermissionAutoGrant(checkString); + if (UtilValidate.isNotEmpty(autoGrant)) { + return autoGrant; + } + if (checkString.indexOf(":") > -1) { + checkString = checkString.substring(0, checkString.lastIndexOf(":")); + } else { + checking = false; + } + } + return null; + } + + @Override + public boolean hasDynamicPermission(String userId, String permission, Map<String, ? extends Object> context) { + if (Debug.verboseOn()) Debug.logVerbose("Running hasDynamicPermission()", module); + String permissionId = permission; + boolean checking = true; + + // find the dynamic access implementation + String dynamicAccess = null; + while (checking) { + if (Debug.verboseOn()) Debug.logVerbose("Looking for dynamic access for permission -- " + permissionId, module); + dynamicAccess = getPermissionDynamicAccess(permissionId); + if (UtilValidate.isEmpty(dynamicAccess)) { + if (permissionId.indexOf(":") > -1) { + permissionId = permissionId.substring(0, permissionId.lastIndexOf(":")); + } else { + Debug.logVerbose("No sections left to check; no dynamic access implementation found", module); + checking = false; + } + } else { + if (Debug.verboseOn()) Debug.logVerbose("Dynamic access implementation found : " + dynamicAccess, module); + checking = false; + } + } + + // if one exists invoke it + if (UtilValidate.isNotEmpty(dynamicAccess)) { + // load the dynamic access handler and invoke it + if (Debug.verboseOn()) Debug.logVerbose("Loading DynamicAccessHandler for -- " + dynamicAccess, module); + DynamicAccessHandler dah = DynamicAccessFactory.getDynamicAccessHandler(delegator, dynamicAccess); + if (dah != null) { + if (Debug.verboseOn()) Debug.logVerbose("Calling DynamicAccessHandler : " + dah.getClass().getName(), module); + return dah.handleDynamicAccess(dynamicAccess, userId, permission, context); + } else { + if (Debug.verboseOn()) { + Debug.logVerbose("No DynamicAccessHandler found for pattern matching -- " + dynamicAccess, module); + } + } + } + return false; + } + + @Override + public boolean hasStaticPermission(String userId, String permission, Map<String, ? extends Object> context) { + if (Debug.verboseOn()) Debug.logVerbose("Running hasStaticPermission()", module); + Iterator<GenericValue> iterator = getUserLoginSecurityGroupByUserLoginId(userId); + GenericValue userLoginSecurityGroup = null; + + while (iterator.hasNext()) { + userLoginSecurityGroup = iterator.next(); + if (securityGroupHasPermission(userLoginSecurityGroup.getString("groupId"), permission)) { + return true; + } + } + return false; + } + + /** + * Test to see if the specified user has permission + * + * @param session HttpSession used to obtain the userId + * @param permission the raw permission string + * @param context name/value pairs used for permission lookup + * @return true if the user has permission + */ + public boolean hasPermission(HttpSession session, String permission, Map<String, ? extends Object> context) { + GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); + if (userLogin != null) { + return hasPermission(userLogin.getString("userLoginId"), permission, context); + } + return false; + } + + public void setDelegator(Delegator delegator) { + this.delegator = delegator; + } + + private Iterator<GenericValue> getUserLoginSecurityGroupByUserLoginId(String userId) { + List<GenericValue> collection; + + try { + collection = delegator.findByAnd("UserLoginSecurityGroup", UtilMisc.toMap("userLoginId", userId), null); + } catch (GenericEntityException e) { + // make an empty collection to speed up the case where a userLogin belongs to no security groups, only with no exception of course + collection = FastList.newInstance(); + Debug.logWarning(e, module); + } + + // filter each time after cache retrieval, i.e. cache will contain entire list + collection = EntityUtil.filterByDate(collection, true); + return collection.iterator(); + } + + private boolean securityGroupHasPermission(String groupId, String permission) { + GenericValue securityGroupPermissionValue = delegator.makeValue("SecurityGroupPermission", + UtilMisc.toMap("groupId", groupId, "permissionId", permission)); + + try { + return delegator.findOne(securityGroupPermissionValue.getEntityName(), securityGroupPermissionValue, false) != null; + } catch (GenericEntityException e) { + Debug.logWarning(e, module); + return false; + } + } + + private List<String> getPermissionAutoGrant(String permission) { + Cache cache = delegator.getCache(); + EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toMap("permissionId", permission)); + List<String> autoGrants = cache.get("SecurityPermissionAutoGrant", condition, "EntityAuthorization.autoGrants"); + if (autoGrants == null) { + autoGrants = FastList.newInstance(); + + List<GenericValue> values = null; + try { + values = delegator.findList("SecurityPermissionAutoGrant", condition, null, null, null, true); + } catch (GenericEntityException e) { + Debug.logWarning(e, module); + } + + if (UtilValidate.isNotEmpty(values)) { + for (GenericValue v : values) { + autoGrants.add(v.getString("grantPermission")); + } + } + cache.put("SecurityPermissionAutoGrant", condition, "EntityAuthorization.autoGrants", autoGrants); + } + return autoGrants; + } + + private String getPermissionDynamicAccess(String perm) { + GenericValue permission = null; + try { + permission = delegator.findOne("SecurityPermission", UtilMisc.toMap("permissionId", perm), true); + } catch (GenericEntityException e) { + Debug.logWarning(e, module); + } + if (permission != null) { + return permission.getString("dynamicAccess"); + } + return null; + } +} Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/EntityAuthorization.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/DynamicAccess.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/DynamicAccessFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/DynamicAccessHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/GroovyDaHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/security/src/org/ofbiz/security/authz/da/ObjectDaHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericInvoker.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/AggregateFunction.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Atom.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BetweenCondition.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConditionList.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConditionPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConditionPlanner.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ConstantValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/CountAllFunction.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/DeletePlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldAll.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FunctionCall.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertRow.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertSource.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/InsertValues.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Joined.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Joiner.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/KeyMap.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Main.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/OrderByItem.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ParameterValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ParameterizedConditionException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Relation.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLDelete.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLIndex.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLInsert.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLSelect.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLUpdate.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLView.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SetField.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/StaticValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/StringValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Table.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/TableName.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Unioned.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/UpdatePlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ViewPlan.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/ConditionsTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/Recorder.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/SQLTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/SelectTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/ValuesTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Instrumenter.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/InstrumenterWorker.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestListContainer.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java?rev=1044202&r1=1044201&r2=1044202&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java (original) +++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java Fri Dec 10 02:40:02 2010 @@ -1,66 +1,66 @@ -/******************************************************************************* - * 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.ofbiz.commons.vfs; - -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; - -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemException; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.impl.StandardFileSystemManager; -import org.ofbiz.base.container.Container; -import org.ofbiz.base.container.ContainerException; -import org.ofbiz.base.util.UtilMisc; -import org.webslinger.commons.vfs.VFSUtil; - -public class CommonsVfsContainer implements Container { - private static StandardFileSystemManager sfsm; - - public void init(String[] args, String configFile) throws ContainerException { - } - - public boolean start() throws ContainerException { - try { - StandardFileSystemManager sfsm = VFSUtil.createStandardFileSystemManager(); - FileObject currentDir = sfsm.resolveFile(new File(".").toURI().toURL().toString()); - sfsm.setBaseFile(currentDir); - CommonsVfsContainer.sfsm = sfsm; - } catch (FileSystemException e) { - throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); - } catch (MalformedURLException e) { - throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); - } - return true; - } - - public void stop() throws ContainerException { - sfsm.close(); - sfsm = null; - } - - public static FileObject resolveFile(String uri) throws IOException { - return sfsm.resolveFile(uri); - } - - public static FileSystemManager getFileSystemManager() { - return sfsm; - } -} +/******************************************************************************* + * 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.ofbiz.commons.vfs; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; + +import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs.FileSystemException; +import org.apache.commons.vfs.FileSystemManager; +import org.apache.commons.vfs.impl.StandardFileSystemManager; +import org.ofbiz.base.container.Container; +import org.ofbiz.base.container.ContainerException; +import org.ofbiz.base.util.UtilMisc; +import org.webslinger.commons.vfs.VFSUtil; + +public class CommonsVfsContainer implements Container { + private static StandardFileSystemManager sfsm; + + public void init(String[] args, String configFile) throws ContainerException { + } + + public boolean start() throws ContainerException { + try { + StandardFileSystemManager sfsm = VFSUtil.createStandardFileSystemManager(); + FileObject currentDir = sfsm.resolveFile(new File(".").toURI().toURL().toString()); + sfsm.setBaseFile(currentDir); + CommonsVfsContainer.sfsm = sfsm; + } catch (FileSystemException e) { + throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); + } catch (MalformedURLException e) { + throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); + } + return true; + } + + public void stop() throws ContainerException { + sfsm.close(); + sfsm = null; + } + + public static FileObject resolveFile(String uri) throws IOException { + return sfsm.resolveFile(uri); + } + + public static FileSystemManager getFileSystemManager() { + return sfsm; + } +} Propchange: ofbiz/trunk/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java ------------------------------------------------------------------------------ svn:eol-style = native |
| Free forum by Nabble | Edit this page |
