This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work in progress: generating validation reports in document list view: …
- Loading branch information
Alex Eng
committed
Mar 21, 2013
1 parent
efedc53
commit 6055958
Showing
11 changed files
with
195 additions
and
51 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
...a-war/src/main/java/org/zanata/webtrans/client/events/DocValidationReportResultEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package org.zanata.webtrans.client.events; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
import org.zanata.common.LocaleId; | ||
import org.zanata.webtrans.shared.model.DocumentId; | ||
import org.zanata.webtrans.shared.model.TransUnitValidationResult; | ||
|
||
import com.google.gwt.event.shared.GwtEvent; | ||
|
||
public class DocValidationReportResultEvent extends GwtEvent<DocValidationReportResultHandler> | ||
{ | ||
private Date startTime; | ||
private Date endTime; | ||
private List<TransUnitValidationResult> result; | ||
private LocaleId localeId; | ||
private DocumentId documentId; | ||
|
||
public DocValidationReportResultEvent(DocumentId documentId, Date startTime, Date endTime, List<TransUnitValidationResult> result, LocaleId localeId) | ||
{ | ||
this.startTime = startTime; | ||
this.endTime = endTime; | ||
this.result = result; | ||
this.localeId = localeId; | ||
this.documentId = documentId; | ||
} | ||
|
||
/** | ||
* Handler type. | ||
*/ | ||
private static Type<DocValidationReportResultHandler> TYPE; | ||
|
||
/** | ||
* Gets the type associated with this event. | ||
* | ||
* @return returns the handler type | ||
*/ | ||
public static Type<DocValidationReportResultHandler> getType() | ||
{ | ||
if (TYPE == null) | ||
{ | ||
TYPE = new Type<DocValidationReportResultHandler>(); | ||
} | ||
return TYPE; | ||
} | ||
|
||
@Override | ||
public com.google.gwt.event.shared.GwtEvent.Type<DocValidationReportResultHandler> getAssociatedType() | ||
{ | ||
return getType(); | ||
} | ||
|
||
@Override | ||
protected void dispatch(DocValidationReportResultHandler handler) | ||
{ | ||
handler.onCompleteRunDocReportValidation(this); | ||
} | ||
|
||
public Date getStartTime() | ||
{ | ||
return startTime; | ||
} | ||
|
||
public Date getEndTime() | ||
{ | ||
return endTime; | ||
} | ||
|
||
public List<TransUnitValidationResult> getResult() | ||
{ | ||
return result; | ||
} | ||
|
||
public LocaleId getLocaleId() | ||
{ | ||
return localeId; | ||
} | ||
|
||
public DocumentId getDocumentId() | ||
{ | ||
return documentId; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...war/src/main/java/org/zanata/webtrans/client/events/DocValidationReportResultHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2010, Red Hat, Inc. and individual contributors | ||
* as indicated by the @author tags. See the copyright.txt file in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.zanata.webtrans.client.events; | ||
|
||
import com.google.gwt.event.shared.EventHandler; | ||
|
||
public interface DocValidationReportResultHandler extends EventHandler | ||
{ | ||
void onCompleteRunDocReportValidation(DocValidationReportResultEvent event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.