Author: emuckenhuber
Date: 2007-09-11 10:45:33 -0400 (Tue, 11 Sep 2007)
New Revision: 8226
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java
trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml
trunk/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml
Log:
- removed the dependencies on jBPM when using subscription mode automatic
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java 2007-09-11
14:45:33 UTC (rev 8226)
@@ -68,10 +68,10 @@
/** The core-identity configuration service */
private IdentityUIConfigurationService identityUIConfigurationService;
- /** . */
+ /** The JNDI binding */
private JNDI.Binding jndiBinding;
- /** . */
+ /** The jndi name */
private String jndiName = null;
public void startService() throws Exception
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java 2007-09-11
14:45:33 UTC (rev 8226)
@@ -48,6 +48,6 @@
* @return WorkflowService
* @throws NamingException
*/
- WorkflowService getWorkflowService() throws NamingException;
+ WorkflowService getWorkflowService();
}
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java 2007-09-11
14:45:33 UTC (rev 8226)
@@ -77,10 +77,10 @@
/** Identity user profile */
private UserProfileModule userProfileModule;
- /** . */
+ /** The JNDI binding */
private JNDI.Binding jndiBinding;
- /** . */
+ /** The jndi name */
private String jndiName = null;
public void startService() throws Exception
@@ -92,19 +92,25 @@
// Creating IdentityUIConfiguration
this.configuration = this.createConfiguration();
- // Loading Workflow if subscriptionmodes != automatic
+ // Loading workflow if subscriptionmodes != automatic
if (this.configuration.enableWorkflow())
{
+ this.workflowService = this.getWorkflowService();
+
String subscriptionMode = this.configuration.getSubscriptionMode();
String adminSubscriptionMode =
this.configuration.getAdminSubscriptionMode();
String emailValidationProcess =
IdentityConstants.jbp_identity_validate_email_process_name;
- if (subscriptionMode != null && adminSubscriptionMode != null
&& emailValidationProcess != null)
+ if ( workflowService != null
+ && subscriptionMode != null
+ && adminSubscriptionMode != null
+ && emailValidationProcess != null)
{
// automatically load email validation process
this.createJBPMContext(emailValidationProcess);
this.createJBPMContext(subscriptionMode);
this.createJBPMContext(adminSubscriptionMode);
+ log.info("jBPM worfklow started ...");
}
else
{
@@ -113,12 +119,12 @@
}
else
{
- log.info("not starting jBPM workflow.");
+ log.info("not starting jBPM workflow ...");
}
}
catch (Exception e)
{
- log.error("Error while starting service: ", e);
+ log.error("Error while starting core identity services ...", e);
super.stopService();
}
@@ -192,21 +198,17 @@
this.userProfileModule = userProfileModule;
}
- public WorkflowService getWorkflowService() throws NamingException
+ public WorkflowService getWorkflowService()
{
- if (workflowService == null)
+ if ( workflowService == null)
{
try
{
- workflowService = (WorkflowService) new
InitialContext().lookup("java:/portal/Workflow");
+ this.workflowService = (WorkflowService) new
InitialContext().lookup("java:/portal/WorkflowService");
}
catch (Exception e)
{
- // OK - if not using jBPM
- if (this.configuration.enableWorkflow())
- {
- throw new RuntimeException("failed to load WorkflowService",
e);
- }
+ log.error("", e);
}
}
return workflowService;
@@ -271,7 +273,7 @@
}
};
- // Adding callback method for ui-components
+ // Adding callback for ui-components
TypeBinding cb = schema.getType(new
javax.xml.namespace.QName("UIComponent"));
cb.setBeforeSetParentCallback(componentCallback);
@@ -306,7 +308,7 @@
}
};
- // Adding callback method for ui-component values
+ // Adding callback for ui-component values
TypeBinding vb = schema.getType(new
javax.xml.namespace.QName("componentValues"));
vb.setBeforeSetParentCallback(valueCallback);
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java 2007-09-11
14:45:33 UTC (rev 8226)
@@ -107,7 +107,7 @@
}
}
- public WorkflowService getWorkflowService() throws NamingException
+ public WorkflowService getWorkflowService()
{
if (this.workflowService == null)
{
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java 2007-09-11
14:45:33 UTC (rev 8226)
@@ -62,10 +62,10 @@
/** The logger */
private static final Logger log = Logger.getLogger(ValidateEmailService.class);
- /** . */
+ /** The JNDI binding */
private JNDI.Binding jndiBinding;
- /** . */
+ /** The jndi name */
private String jndiName = null;
public void startService() throws Exception
@@ -94,18 +94,7 @@
{
if ( workflowService == null)
{
- try
- {
workflowService = (WorkflowService)
identityUIConfigurationService.getWorkflowService();
- }
- catch (Exception e)
- {
- // OK if workflow is disabled
- if (identityUIConfigurationService.getConfiguration().enableWorkflow())
- {
- throw new RuntimeException(e);
- }
- }
}
return this.workflowService;
}
Modified:
trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml 2007-09-11
14:45:33 UTC (rev 8226)
@@ -29,7 +29,7 @@
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute
name="InstanceId">CoreIdentityUserPortletInstance</attribute>
+ <attribute
name="InstanceId">IdentityUserPortletInstance</attribute>
<depends
optional-attribute-name="ValidateEmailService"
proxy-type="attribute">portal:service=ValidateEmailService,type=IdentityUI
@@ -42,7 +42,7 @@
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute
name="InstanceId">CoreIdentityUserPortletInstance</attribute>
+ <attribute
name="InstanceId">IdentityUserPortletInstance</attribute>
<attribute name="Path">/validateEmail</attribute>
<depends
optional-attribute-name="Factory"
@@ -58,11 +58,6 @@
<depends optional-attribute-name="IdentityServiceController"
proxy-type="attribute">
portal:service=Module,type=IdentityServiceController
</depends>
- <!-- comment if no workflow is required -->
- <depends optional-attribute-name="WorkflowService"
proxy-type="attribute">
- portal:service=Workflow,type=WorkflowService
- </depends>
- <!-- -->
<attribute
name="JNDIName">java:portal/IdentityUIConfigurationService</attribute>
</mbean>
@@ -103,12 +98,6 @@
<depends optional-attribute-name="IdentityUserManagementService"
proxy-type="attribute">
portal:service=IdentityUserManagementService,type=IdentityUI
</depends>
- <!-- comment if no workflow is required -->
- <depends optional-attribute-name="WorkflowService"
proxy-type="attribute">
- portal:service=Workflow,type=WorkflowService
- </depends>
- <!-- -->
- <attribute
name="JNDIName">java:portal/RegistrationService</attribute>
</mbean>
<mbean
@@ -123,12 +112,6 @@
<depends optional-attribute-name="IdentityUserManagementService"
proxy-type="attribute">
portal:service=IdentityUserManagementService,type=IdentityUI
</depends>
- <!-- comment if no workflow is required -->
- <depends optional-attribute-name="WorkflowService"
proxy-type="attribute">
- portal:service=Workflow,type=WorkflowService
- </depends>
- <!-- -->
- <attribute
name="JNDIName">java:portal/ValidateEmailService</attribute>
</mbean>
<mbean
Modified:
trunk/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml 2007-09-11
14:45:33 UTC (rev 8226)
@@ -23,12 +23,33 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<identity-ui-configuration>
-
+ <!--
+ subscription mode - defines the workflow used for registering users
+ available default options:
+ - automatic
+ - jbp_identity_validation_workflow
+ - jbp_identity_validation_approval_workflow
+ -->
<subscription-mode>automatic</subscription-mode>
+ <!--
+ overwrite-workflow: overwrites existing process definitions
+ -->
<overwrite-workflow>false</overwrite-workflow>
+ <!--
+ email-domain: used for sending e-mails
+ -->
<email-domain>jboss.org</email-domain>
+ <!--
+ email-from: sender address
+ -->
<email-from>do-no-reply(a)jboss.com</email-from>
+ <!--
+ password-generation-characters: characters used for generating a random password
+ -->
<password-generation-characters>0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWyYzZ*#!+-/"</password-generation-characters>
+ <!--
+ default-roles: roles set on user registration
+ -->
<default-roles>
<role>User</role>
</default-roles>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml 2007-09-11
12:36:29 UTC (rev 8225)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml 2007-09-11
14:45:33 UTC (rev 8226)
@@ -8,27 +8,27 @@
<h:form>
<h:panelGrid columns="2" cellpadding="3">
- <h:outputText for="username"
value="#{bundle.IDENTITY_USERNAME}"/>
+ <h:outputText value="#{bundle.IDENTITY_USERNAME}"/>
<h:inputText id="username" value="#{manager.uiUser.username}"
required="true">
<f:validator validatorId="UsernameValidator"/>
</h:inputText>
<h:panelGroup />
<h:message for="username" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:outputText for="#{metadataservice.email.name}"
value="#{bundle.IDENTITY_EMAIL}"/>
+ <h:outputText value="#{bundle.IDENTITY_EMAIL}"/>
<h:inputText id="#{metadataservice.email.name}"
value="#{manager.uiUser.attribute.email}"
required="#{metadataservice.email.required}">
<f:validator validatorId="#{metadataservice.email.validator}"/>
</h:inputText>
<h:panelGroup />
<h:message for="#{metadataservice.email.name}"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
- <h:outputText for="password"
value="#{bundle.IDENTITY_PASSWORD}"/>
+ <h:outputText value="#{bundle.IDENTITY_PASSWORD}"/>
<h:inputSecret id="password" value="#{manager.uiUser.password}"
required="true">
<f:validateLength minimum="6"/>
</h:inputSecret>
<h:panelGroup />
<h:message for="password" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:outputText for="passwordCheck"
value="#{bundle.IDENTITY_REGISTER_PASSWORD_CONFIRM}"/>
+ <h:outputText value="#{bundle.IDENTITY_REGISTER_PASSWORD_CONFIRM}"/>
<h:inputSecret id="passwordCheck" required="true">
<f:validator validatorId="PasswordValidator"/>
</h:inputSecret>