Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BZ-1192148 - TaskData object not storing Comments, CreatedOn, Expirat…
…ionTime
- Loading branch information
Marco Rietveld
committed
Feb 17, 2015
1 parent
defbee6
commit b386338
Showing
19 changed files
with
773 additions
and
721 deletions.
There are no files selected for viewing
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
83 changes: 83 additions & 0 deletions
83
...an-task-core/src/main/java/org/jbpm/services/task/impl/model/xml/InternalJaxbWrapper.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,83 @@ | ||
package org.jbpm.services.task.impl.model.xml; | ||
|
||
import static org.jbpm.services.task.impl.model.xml.AbstractJaxbTaskObject.unsupported; | ||
|
||
import java.io.IOException; | ||
import java.io.ObjectInput; | ||
import java.io.ObjectOutput; | ||
|
||
import org.kie.api.task.model.Group; | ||
import org.kie.api.task.model.I18NText; | ||
import org.kie.api.task.model.User; | ||
|
||
/** | ||
* This class is used to produce Task API objects. | ||
* | ||
* The class (and all subclasses) are deliberately package-scoped because there are interfaces for these objects. | ||
*/ | ||
class InternalJaxbWrapper { | ||
|
||
static class GetterUser implements User { | ||
|
||
private final String id; | ||
public GetterUser(String id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public void writeExternal( ObjectOutput out ) throws IOException { unsupported(User.class); } | ||
@Override | ||
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { unsupported(User.class); } | ||
} | ||
|
||
static class GetterGroup implements Group { | ||
|
||
private final String id; | ||
|
||
public GetterGroup(String id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public void writeExternal( ObjectOutput out ) throws IOException { unsupported(Group.class); } | ||
@Override | ||
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { unsupported(Group.class); } | ||
} | ||
|
||
static class GetterI18NText implements I18NText { | ||
|
||
private final Long id; | ||
private final String lang; | ||
private final String text; | ||
|
||
public GetterI18NText(Long id, String lang, String text) { | ||
this.id = id; | ||
this.lang = lang; | ||
this.text = text; | ||
} | ||
|
||
@Override | ||
public Long getId() { return this.id; } | ||
|
||
@Override | ||
public String getLanguage() { return this.lang; } | ||
|
||
@Override | ||
public String getText() { return this.text; } | ||
|
||
@Override | ||
public void writeExternal( ObjectOutput out ) throws IOException { unsupported(I18NText.class); } | ||
@Override | ||
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { unsupported(I18NText.class); }; | ||
} | ||
} |
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.