Author: xlawrence
Date: Wed Jun 27 16:43:03 2007
New Revision: 17812
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17812&repname=
=3Djahia
Log:
backport improvement and fixes on error display in workflow report
Added:
trunk/core/src/java/org/jahia/services/fields/URLIntegrityValidForActiv=
ationResults.java
trunk/core/src/java/org/jahia/services/fields/WAIValidForActivationResu=
lts.java
Added: trunk/core/src/java/org/jahia/services/fields/URLIntegrityValidForAc=
tivationResults.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/trunk/core/src=
/java/org/jahia/services/fields/URLIntegrityValidForActivationResults.java&=
rev=3D17812&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/services/fields/URLIntegrityValidForActiv=
ationResults.java (added)
+++ trunk/core/src/java/org/jahia/services/fields/URLIntegrityValidForActiv=
ationResults.java Wed Jun 27 16:43:03 2007
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
obtain
+ * a copy of the License at
+ *
+ * http://www.jahia.org/license/
+ *
+ * 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.jahia.services.fields;
+
+import org.jahia.engines.EngineMessage;
+import org.jahia.content.ObjectKey;
+import org.jahia.content.NodeOperationResult;
+
+/**
+ * @author Xavier Lawrence
+ */
+public class URLIntegrityValidForActivationResults extends NodeOperationRe=
sult {
+ private static final long serialVersionUID =3D -6766780364916155889L;
+ =
+ /**
+ * Constructor for the result.
+ *
+ * @param objectType the objects type. Here only supported object ty=
pes
+ * are allowed. See the org.jahia.content.ObjectKe=
y class and it's
+ * descendents for more information.
+ * @param objectID the identifier within the type, again refer to =
the
+ * ObjectKey class for more information.
+ * @param languageCode the language for which this result is given
+ * @param msg An EngineMessage to use for internationalization
+ * @throws ClassNotFoundException thrown if the object type is not
+ * recognized by Jahia
+ * @see org.jahia.content.ObjectKey
+ */
+ public URLIntegrityValidForActivationResults(final String objectType,
+ final int objectID,
+ final String languageCode,
+ final EngineMessage msg) =
throws ClassNotFoundException {
+ super(ObjectKey.getInstance(objectType + ObjectKey.KEY_SEPARATOR +
+ Integer.toString(objectID)), languageCode, null, msg);
+ }
+
+ public URLIntegrityValidForActivationResults(final String objectType,
+ final int objectID,
+ final String languageCode,
+ final String comment) thr=
ows ClassNotFoundException {
+ super(ObjectKey.getInstance(objectType + ObjectKey.KEY_SEPARATOR +
+ Integer.toString(objectID)), languageCode, comment);
+ }
+
+ public String toString() {
+ final StringBuffer result =3D new StringBuffer();
+ result.append("URLIntegrityValidForActivationResults=3D[");
+ result.append("objectType=3D");
+ result.append(getObjectType());
+ result.append(",objectID=3D");
+ result.append(getObjectID());
+ result.append(",languageCode=3D");
+ result.append(getLanguageCode());
+ result.append(", comment=3D");
+ result.append(getComment());
+ result.append(", msg=3D");
+ result.append(msg);
+ result.append("]");
+ return result.toString();
+ }
+
+ public boolean equals(final Object obj) {
+ if (this =3D=3D obj) return true;
+
+ if (URLIntegrityValidForActivationResults.class =3D=3D obj.getClas=
s()) {
+ final URLIntegrityValidForActivationResults tmp =3D (URLIntegr=
ityValidForActivationResults) obj;
+ final boolean interim =3D tmp.getObjectType().equals(getObject=
Type()) && tmp.getObjectID() =3D=3D getObjectID();
+ if (interim) {
+ final String tmpComment =3D tmp.getComment() =3D=3D null ?=
"" : tmp.getComment();
+ final EngineMessage tmpMsg =3D tmp.getMsg() =3D=3D null ? =
new EngineMessage() : tmp.getMsg();
+ return tmpComment.equals(getComment()) || tmpMsg.equals(ge=
tMsg());
+ }
+ }
+ return false;
+ }
+}
Added: trunk/core/src/java/org/jahia/services/fields/WAIValidForActivationR=
esults.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/trunk/core/src=
/java/org/jahia/services/fields/WAIValidForActivationResults.java&rev=3D178=
12&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/services/fields/WAIValidForActivationResu=
lts.java (added)
+++ trunk/core/src/java/org/jahia/services/fields/WAIValidForActivationResu=
lts.java Wed Jun 27 16:43:03 2007
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
obtain
+ * a copy of the License at
+ *
+ * http://www.jahia.org/license/
+ *
+ * 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.jahia.services.fields;
+
+import org.jahia.content.NodeOperationResult;
+import org.jahia.content.ObjectKey;
+import org.jahia.engines.EngineMessage;
+
+/**
+ * @author Xavier Lawrence
+ */
+public class WAIValidForActivationResults extends NodeOperationResult {
+ private static final long serialVersionUID =3D -4867045020574408090L;
+
+ /**
+ * Constructor for the result.
+ *
+ * @param objectType the objects type. Here only supported object ty=
pes
+ * are allowed. See the org.jahia.content.ObjectKe=
y class and it's
+ * descendents for more information.
+ * @param objectID the identifier within the type, again refer to =
the
+ * ObjectKey class for more information.
+ * @param languageCode the language for which this result is given
+ * @param msg An EngineMessage to use for internationalization
+ * @throws ClassNotFoundException thrown if the object type is not
+ * recognized by Jahia
+ * @see org.jahia.content.ObjectKey
+ */
+ public WAIValidForActivationResults(final String objectType,
+ final int objectID,
+ final String languageCode,
+ final EngineMessage msg) throws Cl=
assNotFoundException {
+ super(ObjectKey.getInstance(objectType + ObjectKey.KEY_SEPARATOR +
+ Integer.toString(objectID)), languageCode, null, msg);
+ }
+
+ public WAIValidForActivationResults(final String objectType,
+ final int objectID,
+ final String languageCode,
+ final String comment) throws Class=
NotFoundException {
+ super(ObjectKey.getInstance(objectType + ObjectKey.KEY_SEPARATOR +
+ Integer.toString(objectID)), languageCode, comment);
+ }
+
+ public String toString() {
+ final StringBuffer result =3D new StringBuffer();
+ result.append("WAIValidForActivationResults=3D[");
+ result.append("objectType=3D");
+ result.append(getObjectType());
+ result.append(",objectID=3D");
+ result.append(getObjectID());
+ result.append(",languageCode=3D");
+ result.append(getLanguageCode());
+ result.append(", comment=3D");
+ result.append(getComment());
+ result.append(", msg=3D");
+ result.append(msg);
+ result.append("]");
+ return result.toString();
+ }
+
+ public boolean equals(final Object obj) {
+ if (this =3D=3D obj) return true;
+
+ if (WAIValidForActivationResults.class =3D=3D obj.getClass()) {
+ final WAIValidForActivationResults tmp =3D (WAIValidForActivat=
ionResults) obj;
+ final boolean interim =3D tmp.getObjectType().equals(getObject=
Type()) && tmp.getObjectID() =3D=3D getObjectID();
+ if (interim) {
+ final String tmpComment =3D tmp.getComment() =3D=3D null ?=
"" : tmp.getComment();
+ final EngineMessage tmpMsg =3D tmp.getMsg() =3D=3D null ? =
new EngineMessage() : tmp.getMsg();
+ return tmpComment.equals(getComment()) || tmpMsg.equals(ge=
tMsg());
+ }
+ }
+ return false;
+ }
+}
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list