Return-Path: X-Original-To: apmail-incubator-isis-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-isis-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82EE5985C for ; Fri, 6 Jul 2012 10:52:00 +0000 (UTC) Received: (qmail 66477 invoked by uid 500); 6 Jul 2012 10:52:00 -0000 Delivered-To: apmail-incubator-isis-commits-archive@incubator.apache.org Received: (qmail 66462 invoked by uid 500); 6 Jul 2012 10:52:00 -0000 Mailing-List: contact isis-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: isis-dev@incubator.apache.org Delivered-To: mailing list isis-commits@incubator.apache.org Received: (qmail 66452 invoked by uid 99); 6 Jul 2012 10:52:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 10:52:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 10:51:50 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C09B02388980; Fri, 6 Jul 2012 10:51:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1358111 [1/13] - in /incubator/isis/trunk/framework/core/commons: ./ src/main/java/org/apache/isis/core/commons/authentication/ src/main/java/org/apache/isis/core/commons/components/ src/main/java/org/apache/isis/core/commons/config/ src/m... Date: Fri, 06 Jul 2012 10:51:21 -0000 To: isis-commits@incubator.apache.org From: danhaywood@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120706105128.C09B02388980@eris.apache.org> Author: danhaywood Date: Fri Jul 6 10:51:16 2012 New Revision: 1358111 URL: http://svn.apache.org/viewvc?rev=1358111&view=rev Log: ISIS-232: added utility function to StringUtils Added: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtilsTest_enumTitle.java - copied, changed from r1357908, incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java Modified: incubator/isis/trunk/framework/core/commons/NOTICE incubator/isis/trunk/framework/core/commons/pom.xml incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AnonymousSession.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionAbstract.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProvider.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAbstract.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAware.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/ApplicationScopedComponent.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Component.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Injectable.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Installer.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Noop.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Resettable.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/SessionScopedComponent.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/TransactionScopedComponent.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/ConfigurationConstants.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/InstallerAbstract.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfiguration.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationAware.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilder.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderAware.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderDefault.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderFileSystem.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderPrimer.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationDefault.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/JmxBeanServer.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/NotFoundPolicy.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/PropertiesReader.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugBuilder.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlString.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlStringAbstract.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugList.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugString.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugTee.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/Debuggable.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebuggableWithTitle.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputExtended.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputExtendedDecorator.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputStreamExtended.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtended.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtendedDecorator.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputStreamExtended.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FieldType.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/ensure/Assert.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/ensure/Ensure.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/ensure/IsisAssertException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/ensure/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/exceptions/IsisApplicationException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/exceptions/IsisException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/exceptions/NotYetImplementedException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/exceptions/UnexpectedCallException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/exceptions/UnknownTypeException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/exceptions/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/factory/InstanceCreationClassException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/factory/InstanceCreationException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/factory/InstanceUtil.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/factory/UnavailableClassException.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/factory/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/io/LazyInputStream.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/io/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/ArrayUtil.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/ArrayUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/CastUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/ClassUtil.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/HashCodeUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/IoUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/JavaClassUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/ListUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/LocaleUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/MapUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/MethodUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/NameUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/PathUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Resources.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/StringBuilderUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/StringUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Threads.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/ThrowableUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/ToString.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/WrapperUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/matchers/IsisMatchers.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/matchers/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/ResourceStreamSource.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/ResourceStreamSourceAbstract.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/ResourceStreamSourceComposite.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/ResourceStreamSourceContextLoaderClassPath.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/ResourceStreamSourceCurrentClassClassPath.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/ResourceStreamSourceFileSystem.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/resource/package-info.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/xml/ContentWriter.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/xml/XmlFile.java incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/xml/package-info.java incubator/isis/trunk/framework/core/commons/src/site/apt/index.apt incubator/isis/trunk/framework/core/commons/src/site/apt/jottings.apt incubator/isis/trunk/framework/core/commons/src/site/site.xml incubator/isis/trunk/framework/core/commons/src/test/config/another.properties incubator/isis/trunk/framework/core/commons/src/test/config/isis.properties incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/config/ConfigurationBuilderFileSystemTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/config/ConfigurationBuilderResourceStreamsConfigResourceAndPolicyTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/config/ConfigurationBuilderTwoDirectoriesTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/config/IsisConfigurationDefaultTest_createSubset.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/config/IsisConfigurationDefault_PropertNamesTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/config/IsisConfigurationDefault_WhitespaceTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/debug/DebugStringTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/encoding/ByteEncoderDecoderRoundtripTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/encoding/EncodabilityContractTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/ensure/Ensure_GivenValueThatDoesMatchTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/ensure/Ensure_GivenValueThatDoesNotMatchTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/IoUtils_CopyTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/NameUtilTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/PrintLocale.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalNameTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalizeTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedVarargsTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_RemoveLeadingWhiteSpace.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_SplitOnCommas.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripLeadingSlashTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripNewLinesTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_camelLowerFirst.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_toLineSeparated.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/matchers/IsisMatchers_ContainsStripNewLinesTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/matchers/IsisMatchers_EndsWithStripNewLinesTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/matchers/IsisMatchers_EqualToStripNewLinesTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/matchers/IsisMatchers_NonEmptyStringOrNullTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/matchers/IsisMatchers_NonEmptyStringTest.java incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/matchers/IsisMatchers_StartsWithStripNewLinesTest.java incubator/isis/trunk/framework/core/commons/src/test/three.properties Modified: incubator/isis/trunk/framework/core/commons/NOTICE URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/NOTICE?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/NOTICE (original) +++ incubator/isis/trunk/framework/core/commons/NOTICE Fri Jul 6 10:51:16 2012 @@ -1,7 +1,7 @@ -Apache Isis -Copyright 2010-2011 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - +Apache Isis +Copyright 2010-2011 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + Modified: incubator/isis/trunk/framework/core/commons/pom.xml URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/pom.xml?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/pom.xml (original) +++ incubator/isis/trunk/framework/core/commons/pom.xml Fri Jul 6 10:51:16 2012 @@ -1,87 +1,87 @@ - - - - 4.0.0 - - - org.apache.isis - core - 0.3.1-incubating-SNAPSHOT - - - org.apache.isis.core - commons - Core Commons - - - ../.. - core/commons/ - - - - http://incubator.apache.org/isis/${relativeUrl} - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - ${maven-project-info-reports-plugin} - false - - false - - - - false - - dependencies - dependency-convergence - plugins - summary - - - - - - - - - - commons-collections - commons-collections - - - commons-codec - commons-codec - - - - org.apache.isis.core - testsupport - test - - - - org.apache.isis - applib - - - - com.google.inject - guice - - - - - - + + + + 4.0.0 + + + org.apache.isis + core + 0.3.1-incubating-SNAPSHOT + + + org.apache.isis.core + commons + Core Commons + + + ../.. + core/commons/ + + + + http://incubator.apache.org/isis/${relativeUrl} + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin} + false + + false + + + + false + + dependencies + dependency-convergence + plugins + summary + + + + + + + + + + commons-collections + commons-collections + + + commons-codec + commons-codec + + + + org.apache.isis.core + testsupport + test + + + + org.apache.isis + applib + + + + com.google.inject + guice + + + + + + Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AnonymousSession.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AnonymousSession.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AnonymousSession.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AnonymousSession.java Fri Jul 6 10:51:16 2012 @@ -1,51 +1,51 @@ -/* - * 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.isis.core.commons.authentication; - -import java.io.IOException; -import java.util.Arrays; - -import org.apache.isis.core.commons.encoding.DataInputExtended; - -/** - * Originally designed for webapp viewers that want to provide access without - * requiring that the user logs on. - * - *

- * For example, a webapp want to have a registration/sign-up page, or a 'lost - * password' page. - */ -public class AnonymousSession extends AuthenticationSessionAbstract { - - private static final long serialVersionUID = 1L; - - private static final String USER_NAME = "__web_default"; - private static final String ROLE = "not-logged-in"; - private static final String CODE = ""; - - public AnonymousSession() { - super(USER_NAME, Arrays.asList(ROLE), CODE); - } - - public AnonymousSession(final DataInputExtended input) throws IOException { - super(input); - } - -} +/* + * 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.isis.core.commons.authentication; + +import java.io.IOException; +import java.util.Arrays; + +import org.apache.isis.core.commons.encoding.DataInputExtended; + +/** + * Originally designed for webapp viewers that want to provide access without + * requiring that the user logs on. + * + *

+ * For example, a webapp want to have a registration/sign-up page, or a 'lost + * password' page. + */ +public class AnonymousSession extends AuthenticationSessionAbstract { + + private static final long serialVersionUID = 1L; + + private static final String USER_NAME = "__web_default"; + private static final String ROLE = "not-logged-in"; + private static final String CODE = ""; + + public AnonymousSession() { + super(USER_NAME, Arrays.asList(ROLE), CODE); + } + + public AnonymousSession(final DataInputExtended input) throws IOException { + super(input); + } + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java Fri Jul 6 10:51:16 2012 @@ -1,65 +1,65 @@ -/* - * 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.isis.core.commons.authentication; - -import java.io.Serializable; -import java.util.List; - -import org.apache.isis.core.commons.encoding.Encodable; - -/** - * The representation within the system of an authenticated user. - */ -public interface AuthenticationSession extends Encodable, Serializable { - - /** - * The name of the authenticated user; for display purposes only. - */ - public String getUserName(); - - public boolean hasUserNameOf(String userName); - - /** - * The roles this user belongs to - */ - public List getRoles(); - - /** - * A unique code given to this session during authentication. - * - *

- * This can be used to confirm that this session has been properly created - * and the user has been authenticated. It should return an empty string ( - * "") if this is unauthenticated user (i.e., as created within an - * exploration system). - */ - public String getValidationCode(); - - /** - * For viewers (in particular) to store additional attributes, analogous to - * an HttpSession. - */ - public Object getAttribute(String attributeName); - - /** - * @see #getAttribute(String) - */ - public void setAttribute(String attributeName, Object attribute); -} +/* + * 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.isis.core.commons.authentication; + +import java.io.Serializable; +import java.util.List; + +import org.apache.isis.core.commons.encoding.Encodable; + +/** + * The representation within the system of an authenticated user. + */ +public interface AuthenticationSession extends Encodable, Serializable { + + /** + * The name of the authenticated user; for display purposes only. + */ + public String getUserName(); + + public boolean hasUserNameOf(String userName); + + /** + * The roles this user belongs to + */ + public List getRoles(); + + /** + * A unique code given to this session during authentication. + * + *

+ * This can be used to confirm that this session has been properly created + * and the user has been authenticated. It should return an empty string ( + * "") if this is unauthenticated user (i.e., as created within an + * exploration system). + */ + public String getValidationCode(); + + /** + * For viewers (in particular) to store additional attributes, analogous to + * an HttpSession. + */ + public Object getAttribute(String attributeName); + + /** + * @see #getAttribute(String) + */ + public void setAttribute(String attributeName, Object attribute); +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionAbstract.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionAbstract.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionAbstract.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionAbstract.java Fri Jul 6 10:51:16 2012 @@ -1,137 +1,137 @@ -/* - * 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.isis.core.commons.authentication; - -import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.isis.core.commons.encoding.DataInputExtended; -import org.apache.isis.core.commons.encoding.DataOutputExtended; -import org.apache.isis.core.commons.lang.ToString; - -public abstract class AuthenticationSessionAbstract implements AuthenticationSession, Serializable { - - private static final long serialVersionUID = 1L; - - private final String name; - private final List roles = new ArrayList(); - private final String validationCode; - - private final Map attributeByName = new HashMap(); - - // /////////////////////////////////////////////////////// - // Constructor, encode - // /////////////////////////////////////////////////////// - - @SuppressWarnings("unchecked") - public AuthenticationSessionAbstract(final String name, final String code) { - this(name, Collections.EMPTY_LIST, code); - } - - public AuthenticationSessionAbstract(final String name, final List roles, final String validationCode) { - this.name = name; - this.roles.addAll(roles); - this.validationCode = validationCode; - initialized(); - } - - public AuthenticationSessionAbstract(final DataInputExtended input) throws IOException { - this.name = input.readUTF(); - this.roles.addAll(Arrays.asList(input.readUTFs())); - this.validationCode = input.readUTF(); - initialized(); - } - - @Override - public void encode(final DataOutputExtended output) throws IOException { - output.writeUTF(getUserName()); - output.writeUTFs(roles.toArray(new String[] {})); - output.writeUTF(validationCode); - } - - private void initialized() { - // nothing to do - } - - // /////////////////////////////////////////////////////// - // User Name - // /////////////////////////////////////////////////////// - - @Override - public String getUserName() { - return name; - } - - @Override - public boolean hasUserNameOf(final String userName) { - return userName == null ? false : userName.equals(getUserName()); - } - - // /////////////////////////////////////////////////////// - // Roles - // /////////////////////////////////////////////////////// - - /** - * Can be overridden. - */ - @Override - public List getRoles() { - return Collections.unmodifiableList(roles); - } - - // /////////////////////////////////////////////////////// - // Validation Code - // /////////////////////////////////////////////////////// - - @Override - public String getValidationCode() { - return validationCode; - } - - // /////////////////////////////////////////////////////// - // Attributes - // /////////////////////////////////////////////////////// - - @Override - public Object getAttribute(final String attributeName) { - return attributeByName.get(attributeName); - } - - @Override - public void setAttribute(final String attributeName, final Object attribute) { - attributeByName.put(attributeName, attribute); - } - - // /////////////////////////////////////////////////////// - // toString - // /////////////////////////////////////////////////////// - - @Override - public String toString() { - return new ToString(this).append("name", getUserName()).append("code", getValidationCode()).toString(); - } - -} +/* + * 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.isis.core.commons.authentication; + +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.isis.core.commons.encoding.DataInputExtended; +import org.apache.isis.core.commons.encoding.DataOutputExtended; +import org.apache.isis.core.commons.lang.ToString; + +public abstract class AuthenticationSessionAbstract implements AuthenticationSession, Serializable { + + private static final long serialVersionUID = 1L; + + private final String name; + private final List roles = new ArrayList(); + private final String validationCode; + + private final Map attributeByName = new HashMap(); + + // /////////////////////////////////////////////////////// + // Constructor, encode + // /////////////////////////////////////////////////////// + + @SuppressWarnings("unchecked") + public AuthenticationSessionAbstract(final String name, final String code) { + this(name, Collections.EMPTY_LIST, code); + } + + public AuthenticationSessionAbstract(final String name, final List roles, final String validationCode) { + this.name = name; + this.roles.addAll(roles); + this.validationCode = validationCode; + initialized(); + } + + public AuthenticationSessionAbstract(final DataInputExtended input) throws IOException { + this.name = input.readUTF(); + this.roles.addAll(Arrays.asList(input.readUTFs())); + this.validationCode = input.readUTF(); + initialized(); + } + + @Override + public void encode(final DataOutputExtended output) throws IOException { + output.writeUTF(getUserName()); + output.writeUTFs(roles.toArray(new String[] {})); + output.writeUTF(validationCode); + } + + private void initialized() { + // nothing to do + } + + // /////////////////////////////////////////////////////// + // User Name + // /////////////////////////////////////////////////////// + + @Override + public String getUserName() { + return name; + } + + @Override + public boolean hasUserNameOf(final String userName) { + return userName == null ? false : userName.equals(getUserName()); + } + + // /////////////////////////////////////////////////////// + // Roles + // /////////////////////////////////////////////////////// + + /** + * Can be overridden. + */ + @Override + public List getRoles() { + return Collections.unmodifiableList(roles); + } + + // /////////////////////////////////////////////////////// + // Validation Code + // /////////////////////////////////////////////////////// + + @Override + public String getValidationCode() { + return validationCode; + } + + // /////////////////////////////////////////////////////// + // Attributes + // /////////////////////////////////////////////////////// + + @Override + public Object getAttribute(final String attributeName) { + return attributeByName.get(attributeName); + } + + @Override + public void setAttribute(final String attributeName, final Object attribute) { + attributeByName.put(attributeName, attribute); + } + + // /////////////////////////////////////////////////////// + // toString + // /////////////////////////////////////////////////////// + + @Override + public String toString() { + return new ToString(this).append("name", getUserName()).append("code", getValidationCode()).toString(); + } + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProvider.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProvider.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProvider.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProvider.java Fri Jul 6 10:51:16 2012 @@ -1,31 +1,31 @@ -/** - * 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.isis.core.commons.authentication; - -import org.apache.isis.core.commons.components.Injectable; - -public interface AuthenticationSessionProvider extends Injectable { - - /** - * Provided by AuthenticationManager when used by framework. - * - *

- * Called in multiple places. - */ - AuthenticationSession getAuthenticationSession(); - -} +/** + * 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.isis.core.commons.authentication; + +import org.apache.isis.core.commons.components.Injectable; + +public interface AuthenticationSessionProvider extends Injectable { + + /** + * Provided by AuthenticationManager when used by framework. + * + *

+ * Called in multiple places. + */ + AuthenticationSession getAuthenticationSession(); + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAbstract.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAbstract.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAbstract.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAbstract.java Fri Jul 6 10:51:16 2012 @@ -1,29 +1,29 @@ -/** - * 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.isis.core.commons.authentication; - -public abstract class AuthenticationSessionProviderAbstract implements AuthenticationSessionProvider { - - @Override - public void injectInto(final Object candidate) { - if (AuthenticationSessionProviderAware.class.isAssignableFrom(candidate.getClass())) { - final AuthenticationSessionProviderAware cast = AuthenticationSessionProviderAware.class.cast(candidate); - cast.setAuthenticationSessionProvider(this); - } - } - -} +/** + * 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.isis.core.commons.authentication; + +public abstract class AuthenticationSessionProviderAbstract implements AuthenticationSessionProvider { + + @Override + public void injectInto(final Object candidate) { + if (AuthenticationSessionProviderAware.class.isAssignableFrom(candidate.getClass())) { + final AuthenticationSessionProviderAware cast = AuthenticationSessionProviderAware.class.cast(candidate); + cast.setAuthenticationSessionProvider(this); + } + } + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAware.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAware.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAware.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionProviderAware.java Fri Jul 6 10:51:16 2012 @@ -1,26 +1,26 @@ -/* - * 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.isis.core.commons.authentication; - -public interface AuthenticationSessionProviderAware { - - public void setAuthenticationSessionProvider(AuthenticationSessionProvider authenticationSessionProvider); - -} +/* + * 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.isis.core.commons.authentication; + +public interface AuthenticationSessionProviderAware { + + public void setAuthenticationSessionProvider(AuthenticationSessionProvider authenticationSessionProvider); + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionUtils.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionUtils.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionUtils.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSessionUtils.java Fri Jul 6 10:51:16 2012 @@ -1,41 +1,41 @@ -/* - * 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.isis.core.commons.authentication; - -import java.util.List; - -import com.google.common.collect.Lists; - -import org.apache.isis.applib.security.RoleMemento; -import org.apache.isis.applib.security.UserMemento; - -public final class AuthenticationSessionUtils { - - private AuthenticationSessionUtils() { - } - - public static UserMemento createUserMemento(final AuthenticationSession session) { - final List roles = Lists.newArrayList(); - for (final String roleName : session.getRoles()) { - roles.add(new RoleMemento(roleName)); - } - return new UserMemento(session.getUserName(), roles); - } -} +/* + * 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.isis.core.commons.authentication; + +import java.util.List; + +import com.google.common.collect.Lists; + +import org.apache.isis.applib.security.RoleMemento; +import org.apache.isis.applib.security.UserMemento; + +public final class AuthenticationSessionUtils { + + private AuthenticationSessionUtils() { + } + + public static UserMemento createUserMemento(final AuthenticationSession session) { + final List roles = Lists.newArrayList(); + for (final String roleName : session.getRoles()) { + roles.add(new RoleMemento(roleName)); + } + return new UserMemento(session.getUserName(), roles); + } +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/package-info.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/package-info.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/package-info.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/package-info.java Fri Jul 6 10:51:16 2012 @@ -1,30 +1,30 @@ -/* - * 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. - */ - -/** - * Defines the {@link org.apache.isis.core.commons.authentication.AuthenticationSession} - * interface that represent a user's session identifier once they have logged on. - * - *

- * The {@link org.apache.isis.core.commons.authentication.AuthenticationSession} - * broadly corresponds to the UserMemento and RoleMemento - * that are defined in the applib. An {@link org.apache.isis.core.commons.authentication.AuthenticationSession} - * is required in order to interact with the rest of the framework. - */ +/* + * 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. + */ + +/** + * Defines the {@link org.apache.isis.core.commons.authentication.AuthenticationSession} + * interface that represent a user's session identifier once they have logged on. + * + *

+ * The {@link org.apache.isis.core.commons.authentication.AuthenticationSession} + * broadly corresponds to the UserMemento and RoleMemento + * that are defined in the applib. An {@link org.apache.isis.core.commons.authentication.AuthenticationSession} + * is required in order to interact with the rest of the framework. + */ package org.apache.isis.core.commons.authentication; \ No newline at end of file Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/ApplicationScopedComponent.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/ApplicationScopedComponent.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/ApplicationScopedComponent.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/ApplicationScopedComponent.java Fri Jul 6 10:51:16 2012 @@ -1,46 +1,46 @@ -/* - * 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.isis.core.commons.components; - -/** - * Indicate that the implementing component is scoped at application level - * (shared across multiple sessions) and might also require initialization or - * being shutdown. - * - *

- * Analogous to Hibernate's SessionFactory. - * - * @see SessionScopedComponent - * @see TransactionScopedComponent - */ -public interface ApplicationScopedComponent extends Component { - - /** - * Indicates to the component that it is to initialise itself. - */ - void init(); - - /** - * Indicates to the component that it will no longer be used and should shut - * itself down cleanly. - */ - void shutdown(); - -} +/* + * 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.isis.core.commons.components; + +/** + * Indicate that the implementing component is scoped at application level + * (shared across multiple sessions) and might also require initialization or + * being shutdown. + * + *

+ * Analogous to Hibernate's SessionFactory. + * + * @see SessionScopedComponent + * @see TransactionScopedComponent + */ +public interface ApplicationScopedComponent extends Component { + + /** + * Indicates to the component that it is to initialise itself. + */ + void init(); + + /** + * Indicates to the component that it will no longer be used and should shut + * itself down cleanly. + */ + void shutdown(); + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Component.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Component.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Component.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Component.java Fri Jul 6 10:51:16 2012 @@ -1,24 +1,24 @@ -/* - * 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.isis.core.commons.components; - -public interface Component { - -} +/* + * 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.isis.core.commons.components; + +public interface Component { + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Injectable.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Injectable.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Injectable.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Injectable.java Fri Jul 6 10:51:16 2012 @@ -1,30 +1,30 @@ -/* - * 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.isis.core.commons.components; - -public interface Injectable { - - /** - * Will inject itself into the candidate if the candidate implements the - * corresponding *Aware type. - */ - void injectInto(Object candidate); - -} +/* + * 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.isis.core.commons.components; + +public interface Injectable { + + /** + * Will inject itself into the candidate if the candidate implements the + * corresponding *Aware type. + */ + void injectInto(Object candidate); + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Installer.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Installer.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Installer.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Installer.java Fri Jul 6 10:51:16 2012 @@ -1,95 +1,95 @@ -/* - * 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.isis.core.commons.components; - -import java.util.List; - -/** - * A factory for a {@link Component}, defining that component's - * {@link #getType() type} and its {@link #getName() name}. - * - *

- * The ({@link #getType() type}, {@link #getName() name}) is expected to be a - * unique identifier of a component. - * - *

- * The default runtime (org.apache.isis.runtimes.dflt module), - * which adopts a service locator design, uses the - * installer-registry.properties resource as a registry of all - * available installers. The installers are loaded and indexed by their name and - * type. Other runtime implementations may use different approaches. - */ -public interface Installer extends ApplicationScopedComponent { - - /** - * The type of the installer, meaning the component type, and consistent - * with the long option of the command line flag where applicable. - * - *

- * Examples are authentication or persistor. - * - *

- * Because all implementations of a given subinterface of {@link Installer} - * should return the same value for this method, by convention these - * subinterfaces define a constant which the implementation can just return. - * - *

- * Used, with {@link #getName()}, to determine the config files and config - * keys for this installer. - * - * @see #getConfigurationResources() - */ - String getType(); - - /** - * The name (qualified by type). - * - *

- * Used, with {@link #getType()}, to determine the config files and config - * keys for this installer. - * - * @see #getConfigurationResources() - */ - String getName(); - - /** - * The configuration resources (files) to merge in configuration properties. - * - *

- * For example, would return list of [persistor.properties, and - * persistor_in-memory.properties] for the in-memory object store. - * - *

- * The implementation should look under keys prefixed either - * isis.persistor or isis.persistor.in-memory. - * - *

- * Note that we use an '_' underscore to join the {@link #getType() type} - * and {@link #getName() name} in the filenames, but a '.' (period) for the - * keys. - */ - List getConfigurationResources(); - - /** - * The (classes of) the types that this installer makes available in the - * {@link #getModule() module}. - */ - List> getTypes(); -} +/* + * 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.isis.core.commons.components; + +import java.util.List; + +/** + * A factory for a {@link Component}, defining that component's + * {@link #getType() type} and its {@link #getName() name}. + * + *

+ * The ({@link #getType() type}, {@link #getName() name}) is expected to be a + * unique identifier of a component. + * + *

+ * The default runtime (org.apache.isis.runtimes.dflt module), + * which adopts a service locator design, uses the + * installer-registry.properties resource as a registry of all + * available installers. The installers are loaded and indexed by their name and + * type. Other runtime implementations may use different approaches. + */ +public interface Installer extends ApplicationScopedComponent { + + /** + * The type of the installer, meaning the component type, and consistent + * with the long option of the command line flag where applicable. + * + *

+ * Examples are authentication or persistor. + * + *

+ * Because all implementations of a given subinterface of {@link Installer} + * should return the same value for this method, by convention these + * subinterfaces define a constant which the implementation can just return. + * + *

+ * Used, with {@link #getName()}, to determine the config files and config + * keys for this installer. + * + * @see #getConfigurationResources() + */ + String getType(); + + /** + * The name (qualified by type). + * + *

+ * Used, with {@link #getType()}, to determine the config files and config + * keys for this installer. + * + * @see #getConfigurationResources() + */ + String getName(); + + /** + * The configuration resources (files) to merge in configuration properties. + * + *

+ * For example, would return list of [persistor.properties, and + * persistor_in-memory.properties] for the in-memory object store. + * + *

+ * The implementation should look under keys prefixed either + * isis.persistor or isis.persistor.in-memory. + * + *

+ * Note that we use an '_' underscore to join the {@link #getType() type} + * and {@link #getName() name} in the filenames, but a '.' (period) for the + * keys. + */ + List getConfigurationResources(); + + /** + * The (classes of) the types that this installer makes available in the + * {@link #getModule() module}. + */ + List> getTypes(); +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Noop.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Noop.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Noop.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Noop.java Fri Jul 6 10:51:16 2012 @@ -1,32 +1,32 @@ -/* - * 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.isis.core.commons.components; - -/** - * Marker interface for components that are no-ops. - * - *

- * Originally introduced in order to support bootstrapping by dependency - * injection frameworks; allows us to specify a no-op in the configuration files - * which will be ignored. - */ -public interface Noop { - -} +/* + * 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.isis.core.commons.components; + +/** + * Marker interface for components that are no-ops. + * + *

+ * Originally introduced in order to support bootstrapping by dependency + * injection frameworks; allows us to specify a no-op in the configuration files + * which will be ignored. + */ +public interface Noop { + +} Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Resettable.java URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Resettable.java?rev=1358111&r1=1358110&r2=1358111&view=diff ============================================================================== --- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Resettable.java (original) +++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/components/Resettable.java Fri Jul 6 10:51:16 2012 @@ -1,33 +1,33 @@ -/* - * 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.isis.core.commons.components; - -/** - * Allows the component to be reset. - * - *

- * Primarily for testing. - * - */ -public interface Resettable { - - void reset(); - -} +/* + * 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.isis.core.commons.components; + +/** + * Allows the component to be reset. + * + *

+ * Primarily for testing. + * + */ +public interface Resettable { + + void reset(); + +}