Author: chris.laprun(a)jboss.com
Date: 2007-05-05 00:56:19 -0400 (Sat, 05 May 2007)
New Revision: 7197
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml
Log:
- Handle existing invalid properties properly.
- Initialize invalid status correctly.
- Removed incorrect natural-id in Hibernate mapping.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-05-05
03:27:54 UTC (rev 7196)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-05-05
04:56:19 UTC (rev 7197)
@@ -339,6 +339,10 @@
{
// take the opportunity to add the property description... ^_^
existing.setDescription(prop.getDescription());
+ if (prop.isInvalid())
+ {
+ result.setHasIssues(true);
+ }
}
else
{
@@ -474,6 +478,7 @@
RegistrationProperty prop = new RegistrationProperty(name, null,
LocaleInfo.getRFC3066LanguageTagFor(desc.getLang()));
prop.setDescription(desc);
prop.setStatus(RegistrationProperty.MISSING_VALUE_STATUS);
+ prop.setInvalid(true);
result.put(name, prop);
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2007-05-05
03:27:54 UTC (rev 7196)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2007-05-05
04:56:19 UTC (rev 7197)
@@ -56,7 +56,7 @@
this.persistentName = name;
this.persistentValue = stringValue;
this.persistentLang = lang;
- persistentInvalid = (stringValue == null);
+ persistentInvalid = (stringValue == null || stringValue.length() == 0);
}
public boolean equals(Object o)
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml
===================================================================
---
trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml 2007-05-05
03:27:54 UTC (rev 7196)
+++
trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml 2007-05-05
04:56:19 UTC (rev 7197)
@@ -91,9 +91,7 @@
<param name="sequence">wsrpconsumer_seq</param>
</generator>
</id>
- <natural-id>
- <property name="name" type="java.lang.String"
not-null="true" unique="false" insert="false"
update="false"/>
- </natural-id>
+ <property name="name" type="java.lang.String"
not-null="true" unique="false" insert="false"
update="false"/>
<property name="value" type="java.lang.String"/>
<property name="invalid" type="boolean"/>
<property name="lang" type="java.lang.String"
not-null="true"/>
Show replies by date