repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/adapter/FavoriteAdapter.java
// Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // }
import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.StopZone;
package flying.grub.tamtime.adapter; public class FavoriteAdapter extends RecyclerView.Adapter<FavoriteAdapter.ViewHolder> { public OnItemClickListener itemClickListener; public OnMenuClickListener menuClickListener;
// Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // } // Path: app/src/main/java/flying/grub/tamtime/adapter/FavoriteAdapter.java import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.StopZone; package flying.grub.tamtime.adapter; public class FavoriteAdapter extends RecyclerView.Adapter<FavoriteAdapter.ViewHolder> { public OnItemClickListener itemClickListener; public OnMenuClickListener menuClickListener;
private ArrayList<StopZone> stops;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/update/UpdateRunnable.java
// Path: app/src/main/java/flying/grub/tamtime/data/Data.java // public class Data { // // private static final String TAG = Data.class.getSimpleName(); // // private DisruptEventHandler disruptEventHandler; // private ReportEvent reportEvent; // private RealTimes realTimes; // private TamMap map; // private RealTimeToUpdate toUpdate; // // private static Data data; // // private Data() { // data = this; // } // // public void init(Context context) { // reportEvent = new ReportEvent(context); // disruptEventHandler = new DisruptEventHandler(context); // realTimes = new RealTimes(context); // map = new TamMap(context); // } // // public static synchronized Data getData() { // if (data == null) { // return new Data(); // } else { // return data; // } // } // // public void update() { // if (toUpdate != null) { // if (toUpdate.isLine()) { // realTimes.updateLine(toUpdate.getLine()); // } else { // realTimes.updateStops(toUpdate.getStops()); // } // } // reportEvent.getReports(); // //disruptEventHandler.getReports(); // } // // public DisruptEventHandler getDisruptEventHandler() { // return disruptEventHandler; // } // // public TamMap getMap() { // return map; // } // // public void setToUpdate(RealTimeToUpdate toUpdate) { // this.toUpdate = toUpdate; // update(); // } // // public RealTimes getRealTimes() { // return realTimes; // } // // public ReportEvent getReportEvent() { // return reportEvent; // } // }
import android.os.Handler; import flying.grub.tamtime.data.Data;
package flying.grub.tamtime.data.update; public class UpdateRunnable implements Runnable { private Handler handler = new Handler(); private static final int TIME = 30000; // 30 sec @Override public void run() {
// Path: app/src/main/java/flying/grub/tamtime/data/Data.java // public class Data { // // private static final String TAG = Data.class.getSimpleName(); // // private DisruptEventHandler disruptEventHandler; // private ReportEvent reportEvent; // private RealTimes realTimes; // private TamMap map; // private RealTimeToUpdate toUpdate; // // private static Data data; // // private Data() { // data = this; // } // // public void init(Context context) { // reportEvent = new ReportEvent(context); // disruptEventHandler = new DisruptEventHandler(context); // realTimes = new RealTimes(context); // map = new TamMap(context); // } // // public static synchronized Data getData() { // if (data == null) { // return new Data(); // } else { // return data; // } // } // // public void update() { // if (toUpdate != null) { // if (toUpdate.isLine()) { // realTimes.updateLine(toUpdate.getLine()); // } else { // realTimes.updateStops(toUpdate.getStops()); // } // } // reportEvent.getReports(); // //disruptEventHandler.getReports(); // } // // public DisruptEventHandler getDisruptEventHandler() { // return disruptEventHandler; // } // // public TamMap getMap() { // return map; // } // // public void setToUpdate(RealTimeToUpdate toUpdate) { // this.toUpdate = toUpdate; // update(); // } // // public RealTimes getRealTimes() { // return realTimes; // } // // public ReportEvent getReportEvent() { // return reportEvent; // } // } // Path: app/src/main/java/flying/grub/tamtime/data/update/UpdateRunnable.java import android.os.Handler; import flying.grub.tamtime.data.Data; package flying.grub.tamtime.data.update; public class UpdateRunnable implements Runnable { private Handler handler = new Handler(); private static final int TIME = 30000; // 30 sec @Override public void run() {
Data.getData().update();
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/adapter/AllLinesAdapter.java
// Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java // public class Line { // private String shortName; // private int id; // private int tam_id; // private int cityway_id; // private int urbanLine; // private ArrayList<Direction> directions; // // private ArrayList<DisruptEvent> disruptEventList; // // public Line(String shortName, int id, int tamID, int citywayID, int urbanLine) { // this.shortName = shortName; // this.id = id; // this.tam_id = tamID; // this.cityway_id = citywayID; // this.urbanLine = urbanLine; // this.directions = new ArrayList<>(); // this.disruptEventList = new ArrayList<>(); // } // // // Get // public Direction getRoute(String direction){ // for (int i = 0; i< directions.size(); i++){ // if (directions.get(i).equals(direction)) { // return directions.get(i); // } // } // return null; // } // // public int getTam_id() { // return tam_id; // } // // public int getCityway_id() { // // return cityway_id; // } // // public int getUrbanLine() { // // return urbanLine; // } // // @Override // public String toString() { // return "Line{" + // "shortName='" + shortName + '\'' + // ", id=" + id + // ", tam_id=" + tam_id + // ", cityway_id=" + cityway_id + // ", directions=" + directions + // ", disruptEventList=" + disruptEventList + // '}'; // } // // public int getId() { // return id; // } // // public ArrayList<Direction> getDirections() { // return this.directions; // } // // public void addRoute(Direction r) { // this.directions.add(r); // } // // public int getDirectionsCount(){ // return this.directions.size(); // } // // public String getShortName(){ // return this.shortName; // } // // public int getLineNum(){ // return this.id; // } // // public ArrayList<DisruptEvent> getDisruptEventList() { // return disruptEventList; // } // // public void removeDisruptEvent(DisruptEvent event) { // this.disruptEventList.remove(event); // } // // public void addDisruptEvent(DisruptEvent event) { // this.disruptEventList.add(event); // } // }
import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.Line;
package flying.grub.tamtime.adapter; public class AllLinesAdapter extends RecyclerView.Adapter<AllLinesAdapter.ViewHolder> { public OnItemClickListener mItemClickListener;
// Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java // public class Line { // private String shortName; // private int id; // private int tam_id; // private int cityway_id; // private int urbanLine; // private ArrayList<Direction> directions; // // private ArrayList<DisruptEvent> disruptEventList; // // public Line(String shortName, int id, int tamID, int citywayID, int urbanLine) { // this.shortName = shortName; // this.id = id; // this.tam_id = tamID; // this.cityway_id = citywayID; // this.urbanLine = urbanLine; // this.directions = new ArrayList<>(); // this.disruptEventList = new ArrayList<>(); // } // // // Get // public Direction getRoute(String direction){ // for (int i = 0; i< directions.size(); i++){ // if (directions.get(i).equals(direction)) { // return directions.get(i); // } // } // return null; // } // // public int getTam_id() { // return tam_id; // } // // public int getCityway_id() { // // return cityway_id; // } // // public int getUrbanLine() { // // return urbanLine; // } // // @Override // public String toString() { // return "Line{" + // "shortName='" + shortName + '\'' + // ", id=" + id + // ", tam_id=" + tam_id + // ", cityway_id=" + cityway_id + // ", directions=" + directions + // ", disruptEventList=" + disruptEventList + // '}'; // } // // public int getId() { // return id; // } // // public ArrayList<Direction> getDirections() { // return this.directions; // } // // public void addRoute(Direction r) { // this.directions.add(r); // } // // public int getDirectionsCount(){ // return this.directions.size(); // } // // public String getShortName(){ // return this.shortName; // } // // public int getLineNum(){ // return this.id; // } // // public ArrayList<DisruptEvent> getDisruptEventList() { // return disruptEventList; // } // // public void removeDisruptEvent(DisruptEvent event) { // this.disruptEventList.remove(event); // } // // public void addDisruptEvent(DisruptEvent event) { // this.disruptEventList.add(event); // } // } // Path: app/src/main/java/flying/grub/tamtime/adapter/AllLinesAdapter.java import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.Line; package flying.grub.tamtime.adapter; public class AllLinesAdapter extends RecyclerView.Adapter<AllLinesAdapter.ViewHolder> { public OnItemClickListener mItemClickListener;
private ArrayList<Line> lines;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/map/Stop.java
// Path: app/src/main/java/flying/grub/tamtime/data/real_time/Time.java // public class Time { // String waitingTime; // int hour; // int minute; // // public Time(String waitingTime, int hour, int minute) { // this.waitingTime = waitingTime; // this.hour = hour; // this.minute = minute; // } // // public String getWaitingTime() { // return waitingTime; // } // }
import java.util.ArrayList; import flying.grub.tamtime.data.real_time.Time;
package flying.grub.tamtime.data.map; public class Stop { private int _id; private int cityway_id; private int tam_id; private StopZone stopZone; private Direction direction;
// Path: app/src/main/java/flying/grub/tamtime/data/real_time/Time.java // public class Time { // String waitingTime; // int hour; // int minute; // // public Time(String waitingTime, int hour, int minute) { // this.waitingTime = waitingTime; // this.hour = hour; // this.minute = minute; // } // // public String getWaitingTime() { // return waitingTime; // } // } // Path: app/src/main/java/flying/grub/tamtime/data/map/Stop.java import java.util.ArrayList; import flying.grub.tamtime.data.real_time.Time; package flying.grub.tamtime.data.map; public class Stop { private int _id; private int cityway_id; private int tam_id; private StopZone stopZone; private Direction direction;
private ArrayList<Time> times;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/adapter/ReportAdapter.java
// Path: app/src/main/java/flying/grub/tamtime/data/report/Report.java // public class Report { // // private StopZone stop; // private ReportType type; // private String message; // private Calendar date; // private int confirm; // private int reportId; // // public Report(StopZone stop, ReportType type, String message, Calendar date, int confirm, int reportId) { // this.stop = stop; // this.type = type; // this.message = message; // this.date = date; // this.confirm = confirm; // this.reportId = reportId; // stop.addReport(this); // } // // public Report(StopZone stop, ReportType type, String message) { // this.stop = stop; // this.type = type; // this.message = message; // } // // // Add // public void removeFromStop() { // this.stop.removeReport(this); // } // // // Get // public String getTime() { // String timeStr; // Calendar now = Calendar.getInstance(); // int min = (int)((now.getTimeInMillis() - this.date.getTimeInMillis()) / 60000); // // if (min >= 180) return "+ de 3h"; // // if (min >= 60) { // int hour = min /60; // min = min % 60; // timeStr = hour + "h" + min + "min"; // } else { // timeStr = min + "min"; // } // return timeStr; // } // // public int getReportId() { // return reportId; // } // // public int getConfirm() { // return this.confirm; // } // // public ReportType getType() { // return type; // } // // public String getMessage() { // return message; // } // // public StopZone getStop() { // return stop; // } // // @Override // public boolean equals(Object o) { // if (this == o) return true; // if (o == null || getClass() != o.getClass()) return false; // // Report report = (Report) o; // // if (stop != null ? !stop.equals(report.stop) : report.stop != null) return false; // if (type != report.type) return false; // if (message != null ? !message.equals(report.message) : report.message != null) // return false; // return !(date != null ? !date.equals(report.date) : report.date != null); // // } // // @Override // public int hashCode() { // int result = stop != null ? stop.hashCode() : 0; // result = 31 * result + (type != null ? type.hashCode() : 0); // result = 31 * result + (message != null ? message.hashCode() : 0); // result = 31 * result + (date != null ? date.hashCode() : 0); // return result; // } // // public boolean isValid(Calendar now) { // return this.date.compareTo(now) > -5400000; // } // // @Override // public String toString() { // return "Report{" + // "message='" + message + '\'' + // ", type=" + type + // ", tps=" + getTime() + // '}'; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/report/ReportType.java // public enum ReportType { // CONTROLE_Q(1), CONTROLE_T(2), INCIDENT(3), AUTRE(4); // private int value; // // ReportType(int value) { // this.value = value; // } // // public int getValue() { // return this.value; // } // // public static ReportType reportFromId(int id) { // switch (id) { // case 1: // return ReportType.CONTROLE_Q; // case 2: // return ReportType.CONTROLE_T; // case 3: // return ReportType.INCIDENT; // case 4: // return ReportType.AUTRE; // default: // return null; // } // } // // public static ReportType reportFromPosition(int pos) { // return reportFromId(pos +1); // } // // public int getValueForString() { // return this.value -1; // } // }
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.report.Report; import flying.grub.tamtime.data.report.ReportType;
package flying.grub.tamtime.adapter; public class ReportAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{ public OnItemClickListener itemClickListener; public static final String TAG = ReportAdapter.class.getSimpleName(); private static final int TYPE_EXTENDED = 0; private static final int TYPE_NORMAL = 1;
// Path: app/src/main/java/flying/grub/tamtime/data/report/Report.java // public class Report { // // private StopZone stop; // private ReportType type; // private String message; // private Calendar date; // private int confirm; // private int reportId; // // public Report(StopZone stop, ReportType type, String message, Calendar date, int confirm, int reportId) { // this.stop = stop; // this.type = type; // this.message = message; // this.date = date; // this.confirm = confirm; // this.reportId = reportId; // stop.addReport(this); // } // // public Report(StopZone stop, ReportType type, String message) { // this.stop = stop; // this.type = type; // this.message = message; // } // // // Add // public void removeFromStop() { // this.stop.removeReport(this); // } // // // Get // public String getTime() { // String timeStr; // Calendar now = Calendar.getInstance(); // int min = (int)((now.getTimeInMillis() - this.date.getTimeInMillis()) / 60000); // // if (min >= 180) return "+ de 3h"; // // if (min >= 60) { // int hour = min /60; // min = min % 60; // timeStr = hour + "h" + min + "min"; // } else { // timeStr = min + "min"; // } // return timeStr; // } // // public int getReportId() { // return reportId; // } // // public int getConfirm() { // return this.confirm; // } // // public ReportType getType() { // return type; // } // // public String getMessage() { // return message; // } // // public StopZone getStop() { // return stop; // } // // @Override // public boolean equals(Object o) { // if (this == o) return true; // if (o == null || getClass() != o.getClass()) return false; // // Report report = (Report) o; // // if (stop != null ? !stop.equals(report.stop) : report.stop != null) return false; // if (type != report.type) return false; // if (message != null ? !message.equals(report.message) : report.message != null) // return false; // return !(date != null ? !date.equals(report.date) : report.date != null); // // } // // @Override // public int hashCode() { // int result = stop != null ? stop.hashCode() : 0; // result = 31 * result + (type != null ? type.hashCode() : 0); // result = 31 * result + (message != null ? message.hashCode() : 0); // result = 31 * result + (date != null ? date.hashCode() : 0); // return result; // } // // public boolean isValid(Calendar now) { // return this.date.compareTo(now) > -5400000; // } // // @Override // public String toString() { // return "Report{" + // "message='" + message + '\'' + // ", type=" + type + // ", tps=" + getTime() + // '}'; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/report/ReportType.java // public enum ReportType { // CONTROLE_Q(1), CONTROLE_T(2), INCIDENT(3), AUTRE(4); // private int value; // // ReportType(int value) { // this.value = value; // } // // public int getValue() { // return this.value; // } // // public static ReportType reportFromId(int id) { // switch (id) { // case 1: // return ReportType.CONTROLE_Q; // case 2: // return ReportType.CONTROLE_T; // case 3: // return ReportType.INCIDENT; // case 4: // return ReportType.AUTRE; // default: // return null; // } // } // // public static ReportType reportFromPosition(int pos) { // return reportFromId(pos +1); // } // // public int getValueForString() { // return this.value -1; // } // } // Path: app/src/main/java/flying/grub/tamtime/adapter/ReportAdapter.java import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.report.Report; import flying.grub.tamtime.data.report.ReportType; package flying.grub.tamtime.adapter; public class ReportAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{ public OnItemClickListener itemClickListener; public static final String TAG = ReportAdapter.class.getSimpleName(); private static final int TYPE_EXTENDED = 0; private static final int TYPE_NORMAL = 1;
public ArrayList<Report> reports;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/adapter/ReportAdapter.java
// Path: app/src/main/java/flying/grub/tamtime/data/report/Report.java // public class Report { // // private StopZone stop; // private ReportType type; // private String message; // private Calendar date; // private int confirm; // private int reportId; // // public Report(StopZone stop, ReportType type, String message, Calendar date, int confirm, int reportId) { // this.stop = stop; // this.type = type; // this.message = message; // this.date = date; // this.confirm = confirm; // this.reportId = reportId; // stop.addReport(this); // } // // public Report(StopZone stop, ReportType type, String message) { // this.stop = stop; // this.type = type; // this.message = message; // } // // // Add // public void removeFromStop() { // this.stop.removeReport(this); // } // // // Get // public String getTime() { // String timeStr; // Calendar now = Calendar.getInstance(); // int min = (int)((now.getTimeInMillis() - this.date.getTimeInMillis()) / 60000); // // if (min >= 180) return "+ de 3h"; // // if (min >= 60) { // int hour = min /60; // min = min % 60; // timeStr = hour + "h" + min + "min"; // } else { // timeStr = min + "min"; // } // return timeStr; // } // // public int getReportId() { // return reportId; // } // // public int getConfirm() { // return this.confirm; // } // // public ReportType getType() { // return type; // } // // public String getMessage() { // return message; // } // // public StopZone getStop() { // return stop; // } // // @Override // public boolean equals(Object o) { // if (this == o) return true; // if (o == null || getClass() != o.getClass()) return false; // // Report report = (Report) o; // // if (stop != null ? !stop.equals(report.stop) : report.stop != null) return false; // if (type != report.type) return false; // if (message != null ? !message.equals(report.message) : report.message != null) // return false; // return !(date != null ? !date.equals(report.date) : report.date != null); // // } // // @Override // public int hashCode() { // int result = stop != null ? stop.hashCode() : 0; // result = 31 * result + (type != null ? type.hashCode() : 0); // result = 31 * result + (message != null ? message.hashCode() : 0); // result = 31 * result + (date != null ? date.hashCode() : 0); // return result; // } // // public boolean isValid(Calendar now) { // return this.date.compareTo(now) > -5400000; // } // // @Override // public String toString() { // return "Report{" + // "message='" + message + '\'' + // ", type=" + type + // ", tps=" + getTime() + // '}'; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/report/ReportType.java // public enum ReportType { // CONTROLE_Q(1), CONTROLE_T(2), INCIDENT(3), AUTRE(4); // private int value; // // ReportType(int value) { // this.value = value; // } // // public int getValue() { // return this.value; // } // // public static ReportType reportFromId(int id) { // switch (id) { // case 1: // return ReportType.CONTROLE_Q; // case 2: // return ReportType.CONTROLE_T; // case 3: // return ReportType.INCIDENT; // case 4: // return ReportType.AUTRE; // default: // return null; // } // } // // public static ReportType reportFromPosition(int pos) { // return reportFromId(pos +1); // } // // public int getValueForString() { // return this.value -1; // } // }
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.report.Report; import flying.grub.tamtime.data.report.ReportType;
public ReportAdapter(ArrayList<Report> reports, Context context) { this.reports = reports; this.context = context; } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == TYPE_EXTENDED) { View v = LayoutInflater.from(parent.getContext()) .inflate(R.layout.item_report_extended, parent, false); return new ViewHolderExtended(v); } else if (viewType == TYPE_NORMAL) { View v = LayoutInflater.from(parent.getContext()) .inflate(R.layout.item_report, parent, false); return new ViewHolderNormal(v); } throw new RuntimeException("there is no type that matches the type " + viewType + " + make sure your using types correctly"); } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { Report report = reports.get(position); ViewHolderNormal hold = (ViewHolderNormal) holder; hold.title.setText(context.getResources().getStringArray(R.array.report_types)[report.getType().getValueForString()]); hold.time.setText(String.format(context.getString(R.string.ago), report.getTime())); String the_cert = context.getResources().getStringArray(R.array.the_cert)[report.getConfirm()]; String certainty = String.format(context.getString(R.string.certainty), the_cert); hold.certainty.setText(certainty);
// Path: app/src/main/java/flying/grub/tamtime/data/report/Report.java // public class Report { // // private StopZone stop; // private ReportType type; // private String message; // private Calendar date; // private int confirm; // private int reportId; // // public Report(StopZone stop, ReportType type, String message, Calendar date, int confirm, int reportId) { // this.stop = stop; // this.type = type; // this.message = message; // this.date = date; // this.confirm = confirm; // this.reportId = reportId; // stop.addReport(this); // } // // public Report(StopZone stop, ReportType type, String message) { // this.stop = stop; // this.type = type; // this.message = message; // } // // // Add // public void removeFromStop() { // this.stop.removeReport(this); // } // // // Get // public String getTime() { // String timeStr; // Calendar now = Calendar.getInstance(); // int min = (int)((now.getTimeInMillis() - this.date.getTimeInMillis()) / 60000); // // if (min >= 180) return "+ de 3h"; // // if (min >= 60) { // int hour = min /60; // min = min % 60; // timeStr = hour + "h" + min + "min"; // } else { // timeStr = min + "min"; // } // return timeStr; // } // // public int getReportId() { // return reportId; // } // // public int getConfirm() { // return this.confirm; // } // // public ReportType getType() { // return type; // } // // public String getMessage() { // return message; // } // // public StopZone getStop() { // return stop; // } // // @Override // public boolean equals(Object o) { // if (this == o) return true; // if (o == null || getClass() != o.getClass()) return false; // // Report report = (Report) o; // // if (stop != null ? !stop.equals(report.stop) : report.stop != null) return false; // if (type != report.type) return false; // if (message != null ? !message.equals(report.message) : report.message != null) // return false; // return !(date != null ? !date.equals(report.date) : report.date != null); // // } // // @Override // public int hashCode() { // int result = stop != null ? stop.hashCode() : 0; // result = 31 * result + (type != null ? type.hashCode() : 0); // result = 31 * result + (message != null ? message.hashCode() : 0); // result = 31 * result + (date != null ? date.hashCode() : 0); // return result; // } // // public boolean isValid(Calendar now) { // return this.date.compareTo(now) > -5400000; // } // // @Override // public String toString() { // return "Report{" + // "message='" + message + '\'' + // ", type=" + type + // ", tps=" + getTime() + // '}'; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/report/ReportType.java // public enum ReportType { // CONTROLE_Q(1), CONTROLE_T(2), INCIDENT(3), AUTRE(4); // private int value; // // ReportType(int value) { // this.value = value; // } // // public int getValue() { // return this.value; // } // // public static ReportType reportFromId(int id) { // switch (id) { // case 1: // return ReportType.CONTROLE_Q; // case 2: // return ReportType.CONTROLE_T; // case 3: // return ReportType.INCIDENT; // case 4: // return ReportType.AUTRE; // default: // return null; // } // } // // public static ReportType reportFromPosition(int pos) { // return reportFromId(pos +1); // } // // public int getValueForString() { // return this.value -1; // } // } // Path: app/src/main/java/flying/grub/tamtime/adapter/ReportAdapter.java import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.report.Report; import flying.grub.tamtime.data.report.ReportType; public ReportAdapter(ArrayList<Report> reports, Context context) { this.reports = reports; this.context = context; } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == TYPE_EXTENDED) { View v = LayoutInflater.from(parent.getContext()) .inflate(R.layout.item_report_extended, parent, false); return new ViewHolderExtended(v); } else if (viewType == TYPE_NORMAL) { View v = LayoutInflater.from(parent.getContext()) .inflate(R.layout.item_report, parent, false); return new ViewHolderNormal(v); } throw new RuntimeException("there is no type that matches the type " + viewType + " + make sure your using types correctly"); } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { Report report = reports.get(position); ViewHolderNormal hold = (ViewHolderNormal) holder; hold.title.setText(context.getResources().getStringArray(R.array.report_types)[report.getType().getValueForString()]); hold.time.setText(String.format(context.getString(R.string.ago), report.getTime())); String the_cert = context.getResources().getStringArray(R.array.the_cert)[report.getConfirm()]; String certainty = String.format(context.getString(R.string.certainty), the_cert); hold.certainty.setText(certainty);
if (holder instanceof ViewHolderExtended && report.getType() == ReportType.AUTRE) {
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/map/StopZone.java
// Path: app/src/main/java/flying/grub/tamtime/data/report/Report.java // public class Report { // // private StopZone stop; // private ReportType type; // private String message; // private Calendar date; // private int confirm; // private int reportId; // // public Report(StopZone stop, ReportType type, String message, Calendar date, int confirm, int reportId) { // this.stop = stop; // this.type = type; // this.message = message; // this.date = date; // this.confirm = confirm; // this.reportId = reportId; // stop.addReport(this); // } // // public Report(StopZone stop, ReportType type, String message) { // this.stop = stop; // this.type = type; // this.message = message; // } // // // Add // public void removeFromStop() { // this.stop.removeReport(this); // } // // // Get // public String getTime() { // String timeStr; // Calendar now = Calendar.getInstance(); // int min = (int)((now.getTimeInMillis() - this.date.getTimeInMillis()) / 60000); // // if (min >= 180) return "+ de 3h"; // // if (min >= 60) { // int hour = min /60; // min = min % 60; // timeStr = hour + "h" + min + "min"; // } else { // timeStr = min + "min"; // } // return timeStr; // } // // public int getReportId() { // return reportId; // } // // public int getConfirm() { // return this.confirm; // } // // public ReportType getType() { // return type; // } // // public String getMessage() { // return message; // } // // public StopZone getStop() { // return stop; // } // // @Override // public boolean equals(Object o) { // if (this == o) return true; // if (o == null || getClass() != o.getClass()) return false; // // Report report = (Report) o; // // if (stop != null ? !stop.equals(report.stop) : report.stop != null) return false; // if (type != report.type) return false; // if (message != null ? !message.equals(report.message) : report.message != null) // return false; // return !(date != null ? !date.equals(report.date) : report.date != null); // // } // // @Override // public int hashCode() { // int result = stop != null ? stop.hashCode() : 0; // result = 31 * result + (type != null ? type.hashCode() : 0); // result = 31 * result + (message != null ? message.hashCode() : 0); // result = 31 * result + (date != null ? date.hashCode() : 0); // return result; // } // // public boolean isValid(Calendar now) { // return this.date.compareTo(now) > -5400000; // } // // @Override // public String toString() { // return "Report{" + // "message='" + message + '\'' + // ", type=" + type + // ", tps=" + getTime() + // '}'; // } // }
import android.location.Location; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import flying.grub.tamtime.data.report.Report;
package flying.grub.tamtime.data.map; public class StopZone { private int _id; private int cityway_id; private int tam_id; private String name; private String search_name; private ArrayList<Line> lines; private ArrayList<Stop> stops; private Location location;
// Path: app/src/main/java/flying/grub/tamtime/data/report/Report.java // public class Report { // // private StopZone stop; // private ReportType type; // private String message; // private Calendar date; // private int confirm; // private int reportId; // // public Report(StopZone stop, ReportType type, String message, Calendar date, int confirm, int reportId) { // this.stop = stop; // this.type = type; // this.message = message; // this.date = date; // this.confirm = confirm; // this.reportId = reportId; // stop.addReport(this); // } // // public Report(StopZone stop, ReportType type, String message) { // this.stop = stop; // this.type = type; // this.message = message; // } // // // Add // public void removeFromStop() { // this.stop.removeReport(this); // } // // // Get // public String getTime() { // String timeStr; // Calendar now = Calendar.getInstance(); // int min = (int)((now.getTimeInMillis() - this.date.getTimeInMillis()) / 60000); // // if (min >= 180) return "+ de 3h"; // // if (min >= 60) { // int hour = min /60; // min = min % 60; // timeStr = hour + "h" + min + "min"; // } else { // timeStr = min + "min"; // } // return timeStr; // } // // public int getReportId() { // return reportId; // } // // public int getConfirm() { // return this.confirm; // } // // public ReportType getType() { // return type; // } // // public String getMessage() { // return message; // } // // public StopZone getStop() { // return stop; // } // // @Override // public boolean equals(Object o) { // if (this == o) return true; // if (o == null || getClass() != o.getClass()) return false; // // Report report = (Report) o; // // if (stop != null ? !stop.equals(report.stop) : report.stop != null) return false; // if (type != report.type) return false; // if (message != null ? !message.equals(report.message) : report.message != null) // return false; // return !(date != null ? !date.equals(report.date) : report.date != null); // // } // // @Override // public int hashCode() { // int result = stop != null ? stop.hashCode() : 0; // result = 31 * result + (type != null ? type.hashCode() : 0); // result = 31 * result + (message != null ? message.hashCode() : 0); // result = 31 * result + (date != null ? date.hashCode() : 0); // return result; // } // // public boolean isValid(Calendar now) { // return this.date.compareTo(now) > -5400000; // } // // @Override // public String toString() { // return "Report{" + // "message='" + message + '\'' + // ", type=" + type + // ", tps=" + getTime() + // '}'; // } // } // Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java import android.location.Location; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import flying.grub.tamtime.data.report.Report; package flying.grub.tamtime.data.map; public class StopZone { private int _id; private int cityway_id; private int tam_id; private String name; private String search_name; private ArrayList<Line> lines; private ArrayList<Stop> stops; private Location location;
private ArrayList<Report> reportList;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/real_time/RealTimeToUpdate.java
// Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java // public class Line { // private String shortName; // private int id; // private int tam_id; // private int cityway_id; // private int urbanLine; // private ArrayList<Direction> directions; // // private ArrayList<DisruptEvent> disruptEventList; // // public Line(String shortName, int id, int tamID, int citywayID, int urbanLine) { // this.shortName = shortName; // this.id = id; // this.tam_id = tamID; // this.cityway_id = citywayID; // this.urbanLine = urbanLine; // this.directions = new ArrayList<>(); // this.disruptEventList = new ArrayList<>(); // } // // // Get // public Direction getRoute(String direction){ // for (int i = 0; i< directions.size(); i++){ // if (directions.get(i).equals(direction)) { // return directions.get(i); // } // } // return null; // } // // public int getTam_id() { // return tam_id; // } // // public int getCityway_id() { // // return cityway_id; // } // // public int getUrbanLine() { // // return urbanLine; // } // // @Override // public String toString() { // return "Line{" + // "shortName='" + shortName + '\'' + // ", id=" + id + // ", tam_id=" + tam_id + // ", cityway_id=" + cityway_id + // ", directions=" + directions + // ", disruptEventList=" + disruptEventList + // '}'; // } // // public int getId() { // return id; // } // // public ArrayList<Direction> getDirections() { // return this.directions; // } // // public void addRoute(Direction r) { // this.directions.add(r); // } // // public int getDirectionsCount(){ // return this.directions.size(); // } // // public String getShortName(){ // return this.shortName; // } // // public int getLineNum(){ // return this.id; // } // // public ArrayList<DisruptEvent> getDisruptEventList() { // return disruptEventList; // } // // public void removeDisruptEvent(DisruptEvent event) { // this.disruptEventList.remove(event); // } // // public void addDisruptEvent(DisruptEvent event) { // this.disruptEventList.add(event); // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/Stop.java // public class Stop { // private int _id; // private int cityway_id; // private int tam_id; // private StopZone stopZone; // private Direction direction; // private ArrayList<Time> times; // // public Stop(int _id, int cityway_id, int tam_id, StopZone stopZone, Direction direction) { // this._id = _id; // this.cityway_id = cityway_id; // this.tam_id = tam_id; // this.stopZone = stopZone; // this.direction = direction; // this.times = new ArrayList<>(); // } // // public int get_id() { // return _id; // } // // public int getCityway_id() { // return cityway_id; // } // // public int getTam_id() { // return tam_id; // } // // public Direction getDirection() { // return direction; // } // // public StopZone getStopZone() { // return stopZone; // } // // public ArrayList<Time> getTimes() { // while (times.size() < 3) { // times.add(new Time("-", 0, 0)); // } // return times; // } // // public void setTimes(ArrayList<Time> times) { // this.times = times; // } // // @Override // public String toString() { // return "Stop{" + // "_id=" + _id + // ", cityway_id=" + cityway_id + // ", tam_id=" + tam_id + // ", stopZone=" + stopZone.getName() + // ", direction=" + direction.getName() + // ", times=" + times + // '}'; // } // // }
import java.util.ArrayList; import flying.grub.tamtime.data.map.Line; import flying.grub.tamtime.data.map.Stop;
package flying.grub.tamtime.data.real_time; public class RealTimeToUpdate { private boolean isLine;
// Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java // public class Line { // private String shortName; // private int id; // private int tam_id; // private int cityway_id; // private int urbanLine; // private ArrayList<Direction> directions; // // private ArrayList<DisruptEvent> disruptEventList; // // public Line(String shortName, int id, int tamID, int citywayID, int urbanLine) { // this.shortName = shortName; // this.id = id; // this.tam_id = tamID; // this.cityway_id = citywayID; // this.urbanLine = urbanLine; // this.directions = new ArrayList<>(); // this.disruptEventList = new ArrayList<>(); // } // // // Get // public Direction getRoute(String direction){ // for (int i = 0; i< directions.size(); i++){ // if (directions.get(i).equals(direction)) { // return directions.get(i); // } // } // return null; // } // // public int getTam_id() { // return tam_id; // } // // public int getCityway_id() { // // return cityway_id; // } // // public int getUrbanLine() { // // return urbanLine; // } // // @Override // public String toString() { // return "Line{" + // "shortName='" + shortName + '\'' + // ", id=" + id + // ", tam_id=" + tam_id + // ", cityway_id=" + cityway_id + // ", directions=" + directions + // ", disruptEventList=" + disruptEventList + // '}'; // } // // public int getId() { // return id; // } // // public ArrayList<Direction> getDirections() { // return this.directions; // } // // public void addRoute(Direction r) { // this.directions.add(r); // } // // public int getDirectionsCount(){ // return this.directions.size(); // } // // public String getShortName(){ // return this.shortName; // } // // public int getLineNum(){ // return this.id; // } // // public ArrayList<DisruptEvent> getDisruptEventList() { // return disruptEventList; // } // // public void removeDisruptEvent(DisruptEvent event) { // this.disruptEventList.remove(event); // } // // public void addDisruptEvent(DisruptEvent event) { // this.disruptEventList.add(event); // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/Stop.java // public class Stop { // private int _id; // private int cityway_id; // private int tam_id; // private StopZone stopZone; // private Direction direction; // private ArrayList<Time> times; // // public Stop(int _id, int cityway_id, int tam_id, StopZone stopZone, Direction direction) { // this._id = _id; // this.cityway_id = cityway_id; // this.tam_id = tam_id; // this.stopZone = stopZone; // this.direction = direction; // this.times = new ArrayList<>(); // } // // public int get_id() { // return _id; // } // // public int getCityway_id() { // return cityway_id; // } // // public int getTam_id() { // return tam_id; // } // // public Direction getDirection() { // return direction; // } // // public StopZone getStopZone() { // return stopZone; // } // // public ArrayList<Time> getTimes() { // while (times.size() < 3) { // times.add(new Time("-", 0, 0)); // } // return times; // } // // public void setTimes(ArrayList<Time> times) { // this.times = times; // } // // @Override // public String toString() { // return "Stop{" + // "_id=" + _id + // ", cityway_id=" + cityway_id + // ", tam_id=" + tam_id + // ", stopZone=" + stopZone.getName() + // ", direction=" + direction.getName() + // ", times=" + times + // '}'; // } // // } // Path: app/src/main/java/flying/grub/tamtime/data/real_time/RealTimeToUpdate.java import java.util.ArrayList; import flying.grub.tamtime.data.map.Line; import flying.grub.tamtime.data.map.Stop; package flying.grub.tamtime.data.real_time; public class RealTimeToUpdate { private boolean isLine;
private Line line;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/real_time/RealTimeToUpdate.java
// Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java // public class Line { // private String shortName; // private int id; // private int tam_id; // private int cityway_id; // private int urbanLine; // private ArrayList<Direction> directions; // // private ArrayList<DisruptEvent> disruptEventList; // // public Line(String shortName, int id, int tamID, int citywayID, int urbanLine) { // this.shortName = shortName; // this.id = id; // this.tam_id = tamID; // this.cityway_id = citywayID; // this.urbanLine = urbanLine; // this.directions = new ArrayList<>(); // this.disruptEventList = new ArrayList<>(); // } // // // Get // public Direction getRoute(String direction){ // for (int i = 0; i< directions.size(); i++){ // if (directions.get(i).equals(direction)) { // return directions.get(i); // } // } // return null; // } // // public int getTam_id() { // return tam_id; // } // // public int getCityway_id() { // // return cityway_id; // } // // public int getUrbanLine() { // // return urbanLine; // } // // @Override // public String toString() { // return "Line{" + // "shortName='" + shortName + '\'' + // ", id=" + id + // ", tam_id=" + tam_id + // ", cityway_id=" + cityway_id + // ", directions=" + directions + // ", disruptEventList=" + disruptEventList + // '}'; // } // // public int getId() { // return id; // } // // public ArrayList<Direction> getDirections() { // return this.directions; // } // // public void addRoute(Direction r) { // this.directions.add(r); // } // // public int getDirectionsCount(){ // return this.directions.size(); // } // // public String getShortName(){ // return this.shortName; // } // // public int getLineNum(){ // return this.id; // } // // public ArrayList<DisruptEvent> getDisruptEventList() { // return disruptEventList; // } // // public void removeDisruptEvent(DisruptEvent event) { // this.disruptEventList.remove(event); // } // // public void addDisruptEvent(DisruptEvent event) { // this.disruptEventList.add(event); // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/Stop.java // public class Stop { // private int _id; // private int cityway_id; // private int tam_id; // private StopZone stopZone; // private Direction direction; // private ArrayList<Time> times; // // public Stop(int _id, int cityway_id, int tam_id, StopZone stopZone, Direction direction) { // this._id = _id; // this.cityway_id = cityway_id; // this.tam_id = tam_id; // this.stopZone = stopZone; // this.direction = direction; // this.times = new ArrayList<>(); // } // // public int get_id() { // return _id; // } // // public int getCityway_id() { // return cityway_id; // } // // public int getTam_id() { // return tam_id; // } // // public Direction getDirection() { // return direction; // } // // public StopZone getStopZone() { // return stopZone; // } // // public ArrayList<Time> getTimes() { // while (times.size() < 3) { // times.add(new Time("-", 0, 0)); // } // return times; // } // // public void setTimes(ArrayList<Time> times) { // this.times = times; // } // // @Override // public String toString() { // return "Stop{" + // "_id=" + _id + // ", cityway_id=" + cityway_id + // ", tam_id=" + tam_id + // ", stopZone=" + stopZone.getName() + // ", direction=" + direction.getName() + // ", times=" + times + // '}'; // } // // }
import java.util.ArrayList; import flying.grub.tamtime.data.map.Line; import flying.grub.tamtime.data.map.Stop;
package flying.grub.tamtime.data.real_time; public class RealTimeToUpdate { private boolean isLine; private Line line;
// Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java // public class Line { // private String shortName; // private int id; // private int tam_id; // private int cityway_id; // private int urbanLine; // private ArrayList<Direction> directions; // // private ArrayList<DisruptEvent> disruptEventList; // // public Line(String shortName, int id, int tamID, int citywayID, int urbanLine) { // this.shortName = shortName; // this.id = id; // this.tam_id = tamID; // this.cityway_id = citywayID; // this.urbanLine = urbanLine; // this.directions = new ArrayList<>(); // this.disruptEventList = new ArrayList<>(); // } // // // Get // public Direction getRoute(String direction){ // for (int i = 0; i< directions.size(); i++){ // if (directions.get(i).equals(direction)) { // return directions.get(i); // } // } // return null; // } // // public int getTam_id() { // return tam_id; // } // // public int getCityway_id() { // // return cityway_id; // } // // public int getUrbanLine() { // // return urbanLine; // } // // @Override // public String toString() { // return "Line{" + // "shortName='" + shortName + '\'' + // ", id=" + id + // ", tam_id=" + tam_id + // ", cityway_id=" + cityway_id + // ", directions=" + directions + // ", disruptEventList=" + disruptEventList + // '}'; // } // // public int getId() { // return id; // } // // public ArrayList<Direction> getDirections() { // return this.directions; // } // // public void addRoute(Direction r) { // this.directions.add(r); // } // // public int getDirectionsCount(){ // return this.directions.size(); // } // // public String getShortName(){ // return this.shortName; // } // // public int getLineNum(){ // return this.id; // } // // public ArrayList<DisruptEvent> getDisruptEventList() { // return disruptEventList; // } // // public void removeDisruptEvent(DisruptEvent event) { // this.disruptEventList.remove(event); // } // // public void addDisruptEvent(DisruptEvent event) { // this.disruptEventList.add(event); // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/Stop.java // public class Stop { // private int _id; // private int cityway_id; // private int tam_id; // private StopZone stopZone; // private Direction direction; // private ArrayList<Time> times; // // public Stop(int _id, int cityway_id, int tam_id, StopZone stopZone, Direction direction) { // this._id = _id; // this.cityway_id = cityway_id; // this.tam_id = tam_id; // this.stopZone = stopZone; // this.direction = direction; // this.times = new ArrayList<>(); // } // // public int get_id() { // return _id; // } // // public int getCityway_id() { // return cityway_id; // } // // public int getTam_id() { // return tam_id; // } // // public Direction getDirection() { // return direction; // } // // public StopZone getStopZone() { // return stopZone; // } // // public ArrayList<Time> getTimes() { // while (times.size() < 3) { // times.add(new Time("-", 0, 0)); // } // return times; // } // // public void setTimes(ArrayList<Time> times) { // this.times = times; // } // // @Override // public String toString() { // return "Stop{" + // "_id=" + _id + // ", cityway_id=" + cityway_id + // ", tam_id=" + tam_id + // ", stopZone=" + stopZone.getName() + // ", direction=" + direction.getName() + // ", times=" + times + // '}'; // } // // } // Path: app/src/main/java/flying/grub/tamtime/data/real_time/RealTimeToUpdate.java import java.util.ArrayList; import flying.grub.tamtime.data.map.Line; import flying.grub.tamtime.data.map.Stop; package flying.grub.tamtime.data.real_time; public class RealTimeToUpdate { private boolean isLine; private Line line;
private ArrayList<Stop> stops;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/map/Line.java
// Path: app/src/main/java/flying/grub/tamtime/data/dirsruption/DisruptEvent.java // public class DisruptEvent { // private Line line; // private Calendar beginDate; // private Calendar endDate; // private String title; // // public DisruptEvent(Line line, Calendar begD, Calendar endD, String title) { // Data.getData().getDisruptEventHandler().addDisruptEvent(this); // this.line = line; // this.line.addDisruptEvent(this); // this.beginDate = begD; // this.endDate = endD; // this.title = title; // } // // public boolean asValidDate() { // Calendar now = Calendar.getInstance(); // if (now.compareTo(this.endDate) <= 0) return true; // return false; // } // // public void destroy() { // this.line.removeDisruptEvent(this); // Data.getData().getDisruptEventHandler().removeDisruptEvent(this); // } // // // Tests & Bullshit // public String toString() { // return this.title; // } // }
import java.util.ArrayList; import flying.grub.tamtime.data.dirsruption.DisruptEvent;
package flying.grub.tamtime.data.map; public class Line { private String shortName; private int id; private int tam_id; private int cityway_id; private int urbanLine; private ArrayList<Direction> directions;
// Path: app/src/main/java/flying/grub/tamtime/data/dirsruption/DisruptEvent.java // public class DisruptEvent { // private Line line; // private Calendar beginDate; // private Calendar endDate; // private String title; // // public DisruptEvent(Line line, Calendar begD, Calendar endD, String title) { // Data.getData().getDisruptEventHandler().addDisruptEvent(this); // this.line = line; // this.line.addDisruptEvent(this); // this.beginDate = begD; // this.endDate = endD; // this.title = title; // } // // public boolean asValidDate() { // Calendar now = Calendar.getInstance(); // if (now.compareTo(this.endDate) <= 0) return true; // return false; // } // // public void destroy() { // this.line.removeDisruptEvent(this); // Data.getData().getDisruptEventHandler().removeDisruptEvent(this); // } // // // Tests & Bullshit // public String toString() { // return this.title; // } // } // Path: app/src/main/java/flying/grub/tamtime/data/map/Line.java import java.util.ArrayList; import flying.grub.tamtime.data.dirsruption.DisruptEvent; package flying.grub.tamtime.data.map; public class Line { private String shortName; private int id; private int tam_id; private int cityway_id; private int urbanLine; private ArrayList<Direction> directions;
private ArrayList<DisruptEvent> disruptEventList;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/adapter/FavWelcomeAdapter.java
// Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // }
import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.StopZone;
package flying.grub.tamtime.adapter; public class FavWelcomeAdapter extends RecyclerView.Adapter<FavWelcomeAdapter.ViewHolder> { public OnItemClickListener itemClickListener; public OnMenuClickListener menuClickListener;
// Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // } // Path: app/src/main/java/flying/grub/tamtime/adapter/FavWelcomeAdapter.java import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.StopZone; package flying.grub.tamtime.adapter; public class FavWelcomeAdapter extends RecyclerView.Adapter<FavWelcomeAdapter.ViewHolder> { public OnItemClickListener itemClickListener; public OnMenuClickListener menuClickListener;
private ArrayList<StopZone> stops;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/adapter/NearStopAdapter.java
// Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // }
import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.StopZone;
package flying.grub.tamtime.adapter; public class NearStopAdapter extends RecyclerView.Adapter<NearStopAdapter.ViewHolder> { public OnItemClickListener itemClickListener;
// Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // } // Path: app/src/main/java/flying/grub/tamtime/adapter/NearStopAdapter.java import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import flying.grub.tamtime.R; import flying.grub.tamtime.data.map.StopZone; package flying.grub.tamtime.adapter; public class NearStopAdapter extends RecyclerView.Adapter<NearStopAdapter.ViewHolder> { public OnItemClickListener itemClickListener;
private ArrayList<StopZone> stops;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/persistence/FavoriteStops.java
// Path: app/src/main/java/flying/grub/tamtime/data/Data.java // public class Data { // // private static final String TAG = Data.class.getSimpleName(); // // private DisruptEventHandler disruptEventHandler; // private ReportEvent reportEvent; // private RealTimes realTimes; // private TamMap map; // private RealTimeToUpdate toUpdate; // // private static Data data; // // private Data() { // data = this; // } // // public void init(Context context) { // reportEvent = new ReportEvent(context); // disruptEventHandler = new DisruptEventHandler(context); // realTimes = new RealTimes(context); // map = new TamMap(context); // } // // public static synchronized Data getData() { // if (data == null) { // return new Data(); // } else { // return data; // } // } // // public void update() { // if (toUpdate != null) { // if (toUpdate.isLine()) { // realTimes.updateLine(toUpdate.getLine()); // } else { // realTimes.updateStops(toUpdate.getStops()); // } // } // reportEvent.getReports(); // //disruptEventHandler.getReports(); // } // // public DisruptEventHandler getDisruptEventHandler() { // return disruptEventHandler; // } // // public TamMap getMap() { // return map; // } // // public void setToUpdate(RealTimeToUpdate toUpdate) { // this.toUpdate = toUpdate; // update(); // } // // public RealTimes getRealTimes() { // return realTimes; // } // // public ReportEvent getReportEvent() { // return reportEvent; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // }
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.List; import flying.grub.tamtime.data.Data; import flying.grub.tamtime.data.map.StopZone;
package flying.grub.tamtime.data.persistence; public class FavoriteStops { private static final String TAG = FavoriteStops.class.getSimpleName();
// Path: app/src/main/java/flying/grub/tamtime/data/Data.java // public class Data { // // private static final String TAG = Data.class.getSimpleName(); // // private DisruptEventHandler disruptEventHandler; // private ReportEvent reportEvent; // private RealTimes realTimes; // private TamMap map; // private RealTimeToUpdate toUpdate; // // private static Data data; // // private Data() { // data = this; // } // // public void init(Context context) { // reportEvent = new ReportEvent(context); // disruptEventHandler = new DisruptEventHandler(context); // realTimes = new RealTimes(context); // map = new TamMap(context); // } // // public static synchronized Data getData() { // if (data == null) { // return new Data(); // } else { // return data; // } // } // // public void update() { // if (toUpdate != null) { // if (toUpdate.isLine()) { // realTimes.updateLine(toUpdate.getLine()); // } else { // realTimes.updateStops(toUpdate.getStops()); // } // } // reportEvent.getReports(); // //disruptEventHandler.getReports(); // } // // public DisruptEventHandler getDisruptEventHandler() { // return disruptEventHandler; // } // // public TamMap getMap() { // return map; // } // // public void setToUpdate(RealTimeToUpdate toUpdate) { // this.toUpdate = toUpdate; // update(); // } // // public RealTimes getRealTimes() { // return realTimes; // } // // public ReportEvent getReportEvent() { // return reportEvent; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // } // Path: app/src/main/java/flying/grub/tamtime/data/persistence/FavoriteStops.java import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.List; import flying.grub.tamtime.data.Data; import flying.grub.tamtime.data.map.StopZone; package flying.grub.tamtime.data.persistence; public class FavoriteStops { private static final String TAG = FavoriteStops.class.getSimpleName();
private List<StopZone> favoriteStop;
flyingrub/TamTime
app/src/main/java/flying/grub/tamtime/data/persistence/FavoriteStops.java
// Path: app/src/main/java/flying/grub/tamtime/data/Data.java // public class Data { // // private static final String TAG = Data.class.getSimpleName(); // // private DisruptEventHandler disruptEventHandler; // private ReportEvent reportEvent; // private RealTimes realTimes; // private TamMap map; // private RealTimeToUpdate toUpdate; // // private static Data data; // // private Data() { // data = this; // } // // public void init(Context context) { // reportEvent = new ReportEvent(context); // disruptEventHandler = new DisruptEventHandler(context); // realTimes = new RealTimes(context); // map = new TamMap(context); // } // // public static synchronized Data getData() { // if (data == null) { // return new Data(); // } else { // return data; // } // } // // public void update() { // if (toUpdate != null) { // if (toUpdate.isLine()) { // realTimes.updateLine(toUpdate.getLine()); // } else { // realTimes.updateStops(toUpdate.getStops()); // } // } // reportEvent.getReports(); // //disruptEventHandler.getReports(); // } // // public DisruptEventHandler getDisruptEventHandler() { // return disruptEventHandler; // } // // public TamMap getMap() { // return map; // } // // public void setToUpdate(RealTimeToUpdate toUpdate) { // this.toUpdate = toUpdate; // update(); // } // // public RealTimes getRealTimes() { // return realTimes; // } // // public ReportEvent getReportEvent() { // return reportEvent; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // }
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.List; import flying.grub.tamtime.data.Data; import flying.grub.tamtime.data.map.StopZone;
package flying.grub.tamtime.data.persistence; public class FavoriteStops { private static final String TAG = FavoriteStops.class.getSimpleName(); private List<StopZone> favoriteStop; private Context context; public FavoriteStops(Context c) { context = c; getFromPref(); } private void getFromPref() { SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); favoriteStop = new ArrayList<>(); for (String stop_zone_id : defaultSharedPreferences.getStringSet(TAG, new HashSet<String>())) {
// Path: app/src/main/java/flying/grub/tamtime/data/Data.java // public class Data { // // private static final String TAG = Data.class.getSimpleName(); // // private DisruptEventHandler disruptEventHandler; // private ReportEvent reportEvent; // private RealTimes realTimes; // private TamMap map; // private RealTimeToUpdate toUpdate; // // private static Data data; // // private Data() { // data = this; // } // // public void init(Context context) { // reportEvent = new ReportEvent(context); // disruptEventHandler = new DisruptEventHandler(context); // realTimes = new RealTimes(context); // map = new TamMap(context); // } // // public static synchronized Data getData() { // if (data == null) { // return new Data(); // } else { // return data; // } // } // // public void update() { // if (toUpdate != null) { // if (toUpdate.isLine()) { // realTimes.updateLine(toUpdate.getLine()); // } else { // realTimes.updateStops(toUpdate.getStops()); // } // } // reportEvent.getReports(); // //disruptEventHandler.getReports(); // } // // public DisruptEventHandler getDisruptEventHandler() { // return disruptEventHandler; // } // // public TamMap getMap() { // return map; // } // // public void setToUpdate(RealTimeToUpdate toUpdate) { // this.toUpdate = toUpdate; // update(); // } // // public RealTimes getRealTimes() { // return realTimes; // } // // public ReportEvent getReportEvent() { // return reportEvent; // } // } // // Path: app/src/main/java/flying/grub/tamtime/data/map/StopZone.java // public class StopZone { // private int _id; // private int cityway_id; // private int tam_id; // private String name; // private String search_name; // private ArrayList<Line> lines; // private ArrayList<Stop> stops; // // private Location location; // private ArrayList<Report> reportList; // private float distanceFromUser; // // public StopZone(String name, int _id, int tam_id, int cityway_id, String search_name, double lat, double lon){ // this.lines = new ArrayList<>(); // this.reportList = new ArrayList<>(); // this.name = name; // this.cityway_id = cityway_id; // this._id = _id; // this.tam_id = tam_id; // this.search_name = search_name; // this.location = new Location(name); // this.location.setLongitude(lon); // this.location.setLatitude(lat); // this.stops = new ArrayList<>(); // } // // public void addLine(Line line) { // if (!this.lines.contains(line)) { // this.lines.add(line); // } // } // // public void addStop(Stop stop) { // this.stops.add(stop); // } // // public String getName() { // return name; // } // // public ArrayList<Line> getLines() { // return this.lines; // } // // public int getID() { // return this._id; // } // // public void addReport(Report report) { // this.reportList.add(report); // } // // public ArrayList<Report> getReports() { // ArrayList<Report> res = new ArrayList<>(); // Calendar date = Calendar.getInstance(); // for (Report r : this.reportList) { // if (r.isValid(date)) res.add(r); // } // Collections.reverse(res); // the last is the oldest now. // return res; // } // // public void removeReport(Report rep) { // this.reportList.remove(rep); // } // // public void calcDistanceFromUser(Location user) { // distanceFromUser = user.distanceTo(this.location); // } // // public String getNormalisedName() { // return search_name; // } // // public float getDistanceFromUser() { // return distanceFromUser; // } // // public ArrayList<Stop> getStops(Line line) { // ArrayList<Stop> res = new ArrayList<>(); // for (Stop stop : stops) { // if (stop.getDirection().getLine().getCityway_id() == line.getCityway_id()) { // res.add(stop); // } // } // return res; // } // // public ArrayList<Stop> getStops() { // return stops; // } // // @Override // public String toString() { // return "StopZone{" + // "name='" + name + '\'' + // ", lines=" + lines + // ", stops=" + stops + // '}'; // } // } // Path: app/src/main/java/flying/grub/tamtime/data/persistence/FavoriteStops.java import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.List; import flying.grub.tamtime.data.Data; import flying.grub.tamtime.data.map.StopZone; package flying.grub.tamtime.data.persistence; public class FavoriteStops { private static final String TAG = FavoriteStops.class.getSimpleName(); private List<StopZone> favoriteStop; private Context context; public FavoriteStops(Context c) { context = c; getFromPref(); } private void getFromPref() { SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); favoriteStop = new ArrayList<>(); for (String stop_zone_id : defaultSharedPreferences.getStringSet(TAG, new HashSet<String>())) {
favoriteStop.add(Data.getData().getMap().getStopZoneById(Integer.parseInt(stop_zone_id)));
xujeff/tianti
tianti-modules/tianti-module-admin/src/main/java/com/jeff/tianti/controller/UploadController.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/dto/AjaxResult.java // public class AjaxResult { // // private boolean success; // // private String msg; // // private Object data; // // public boolean isSuccess() { // return success; // } // // public void setSuccess(boolean success) { // this.success = success; // } // // public String getMsg() { // return msg; // } // // public void setMsg(String msg) { // this.msg = msg; // } // // public Object getData() { // return data; // } // // public void setData(Object data) { // this.data = data; // } // // }
import java.io.File; import java.io.PrintWriter; import java.util.Map; import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import com.jeff.tianti.common.dto.AjaxResult;
package com.jeff.tianti.controller; /** * 文件异步上传Controller * @author JeffXu * @since 2016-03-14 */ @Controller @RequestMapping("/upload") public class UploadController { public final static String ATTACH_SAVE_PATH = "attach"; @RequestMapping("/uploadAttach") public void uploadAttach(HttpServletRequest request, PrintWriter out) { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); MultipartFile multipartFile = null; String fileName = null; for (Map.Entry<String, MultipartFile> set : fileMap.entrySet()) { multipartFile = set.getValue();// 文件名 } fileName = this.storeIOc(multipartRequest, multipartFile); out.print(fileName); } @RequestMapping("/ajax/upload_file") @ResponseBody
// Path: tianti-common/src/main/java/com/jeff/tianti/common/dto/AjaxResult.java // public class AjaxResult { // // private boolean success; // // private String msg; // // private Object data; // // public boolean isSuccess() { // return success; // } // // public void setSuccess(boolean success) { // this.success = success; // } // // public String getMsg() { // return msg; // } // // public void setMsg(String msg) { // this.msg = msg; // } // // public Object getData() { // return data; // } // // public void setData(Object data) { // this.data = data; // } // // } // Path: tianti-modules/tianti-module-admin/src/main/java/com/jeff/tianti/controller/UploadController.java import java.io.File; import java.io.PrintWriter; import java.util.Map; import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import com.jeff.tianti.common.dto.AjaxResult; package com.jeff.tianti.controller; /** * 文件异步上传Controller * @author JeffXu * @since 2016-03-14 */ @Controller @RequestMapping("/upload") public class UploadController { public final static String ATTACH_SAVE_PATH = "attach"; @RequestMapping("/uploadAttach") public void uploadAttach(HttpServletRequest request, PrintWriter out) { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); MultipartFile multipartFile = null; String fileName = null; for (Map.Entry<String, MultipartFile> set : fileMap.entrySet()) { multipartFile = set.getValue();// 文件名 } fileName = this.storeIOc(multipartRequest, multipartFile); out.print(fileName); } @RequestMapping("/ajax/upload_file") @ResponseBody
public AjaxResult ajaxUploadFile(HttpServletRequest request) {
xujeff/tianti
tianti-modules/tianti-module-admin/src/main/java/com/jeff/tianti/util/WebHelper.java
// Path: tianti-org/src/main/java/com/jeff/tianti/org/entity/User.java // @Entity // @Table(name = "org_user") // @Inheritance(strategy = InheritanceType.JOINED) // public class User extends BaseEntity{ // // private static final long serialVersionUID = -8821121831372299051L; // // public final static Integer STATUS_YES = 1; //可用 // // public final static Integer STATUS_NO = 0; //不可用 // // public final static Integer USER_TYPE_INS = 1; //机构用户 // // private String username; //用户名称 // // private String password; //密码 // // private String realName; //真实姓名 // // private String email; //邮箱 // // private String mobile; //电话 // // private Integer status; //状态 // // private Set<Role> roles; //拥有角色 // // private Integer type; //0 为管理员 // // private String currentSkin; //当前皮肤 // // @Column(name = "username",length=50) // public String getUsername() { // return username; // } // // public void setUsername(String username) { // this.username = username; // } // // @Column(name = "password",length=32) // public String getPassword() { // return password; // } // // public void setPassword(String password) { // this.password = password; // } // // @Column(name = "real_name",length=50) // public String getRealName() { // return realName; // } // // public void setRealName(String realName) { // this.realName = realName; // } // // @Column(length=30) // public String getEmail() { // return email; // } // // public void setEmail(String email) { // this.email = email; // } // // @Column(length=20) // public String getMobile() { // return mobile; // } // // public void setMobile(String mobile) { // this.mobile = mobile; // } // // @Column(name="status", precision = 1) // public Integer getStatus() { // return status; // } // // public void setStatus(Integer status) { // this.status = status; // } // // @ManyToMany(fetch = FetchType.LAZY) // @JoinTable(name = "org_user_role_rel", // joinColumns = {@JoinColumn(name = "user_id")}, // inverseJoinColumns = {@JoinColumn(name = "role_id")}) // @Where(clause="delete_flag=0") // @OrderBy("no") // public Set<Role> getRoles() { // return roles; // } // // public void setRoles(Set<Role> roles) { // this.roles = roles; // } // // @Column(name = "type", precision = 1, columnDefinition = "int default 0", nullable = false) // public Integer getType() { // return type; // } // // public void setType(Integer type) { // this.type = type; // } // // @Column(name = "current_skin",length = 16) // public String getCurrentSkin() { // return currentSkin; // } // // public void setCurrentSkin(String currentSkin) { // this.currentSkin = currentSkin; // } // // }
import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.ui.Model; import com.jeff.tianti.org.entity.User;
package com.jeff.tianti.util; public class WebHelper { public static final String SESSION_LOGIN_USER = "session_login_user"; public static final String SESSION_MENU_RESOURCE = "session_menu_resource"; public static final String SESSION_NO_IMPORT_SCORE = "session_no_import_score"; /** * * @param request * @return */ public static Integer getCurrentPage(HttpServletRequest request) { String currentPage = request.getParameter("currentPage"); if (StringUtils.isNotBlank(currentPage) && StringUtils.isNumeric(currentPage)) { return Integer.parseInt(currentPage); } return null; } /** * * @param request * @return */ public static Integer getPageSize(HttpServletRequest request) { String pageSize = request.getParameter("pageSize"); if (StringUtils.isNotBlank(pageSize) && StringUtils.isNumeric(pageSize)) { return Integer.parseInt(pageSize); } return null; } /** * * @param request * @return */
// Path: tianti-org/src/main/java/com/jeff/tianti/org/entity/User.java // @Entity // @Table(name = "org_user") // @Inheritance(strategy = InheritanceType.JOINED) // public class User extends BaseEntity{ // // private static final long serialVersionUID = -8821121831372299051L; // // public final static Integer STATUS_YES = 1; //可用 // // public final static Integer STATUS_NO = 0; //不可用 // // public final static Integer USER_TYPE_INS = 1; //机构用户 // // private String username; //用户名称 // // private String password; //密码 // // private String realName; //真实姓名 // // private String email; //邮箱 // // private String mobile; //电话 // // private Integer status; //状态 // // private Set<Role> roles; //拥有角色 // // private Integer type; //0 为管理员 // // private String currentSkin; //当前皮肤 // // @Column(name = "username",length=50) // public String getUsername() { // return username; // } // // public void setUsername(String username) { // this.username = username; // } // // @Column(name = "password",length=32) // public String getPassword() { // return password; // } // // public void setPassword(String password) { // this.password = password; // } // // @Column(name = "real_name",length=50) // public String getRealName() { // return realName; // } // // public void setRealName(String realName) { // this.realName = realName; // } // // @Column(length=30) // public String getEmail() { // return email; // } // // public void setEmail(String email) { // this.email = email; // } // // @Column(length=20) // public String getMobile() { // return mobile; // } // // public void setMobile(String mobile) { // this.mobile = mobile; // } // // @Column(name="status", precision = 1) // public Integer getStatus() { // return status; // } // // public void setStatus(Integer status) { // this.status = status; // } // // @ManyToMany(fetch = FetchType.LAZY) // @JoinTable(name = "org_user_role_rel", // joinColumns = {@JoinColumn(name = "user_id")}, // inverseJoinColumns = {@JoinColumn(name = "role_id")}) // @Where(clause="delete_flag=0") // @OrderBy("no") // public Set<Role> getRoles() { // return roles; // } // // public void setRoles(Set<Role> roles) { // this.roles = roles; // } // // @Column(name = "type", precision = 1, columnDefinition = "int default 0", nullable = false) // public Integer getType() { // return type; // } // // public void setType(Integer type) { // this.type = type; // } // // @Column(name = "current_skin",length = 16) // public String getCurrentSkin() { // return currentSkin; // } // // public void setCurrentSkin(String currentSkin) { // this.currentSkin = currentSkin; // } // // } // Path: tianti-modules/tianti-module-admin/src/main/java/com/jeff/tianti/util/WebHelper.java import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.ui.Model; import com.jeff.tianti.org.entity.User; package com.jeff.tianti.util; public class WebHelper { public static final String SESSION_LOGIN_USER = "session_login_user"; public static final String SESSION_MENU_RESOURCE = "session_menu_resource"; public static final String SESSION_NO_IMPORT_SCORE = "session_no_import_score"; /** * * @param request * @return */ public static Integer getCurrentPage(HttpServletRequest request) { String currentPage = request.getParameter("currentPage"); if (StringUtils.isNotBlank(currentPage) && StringUtils.isNumeric(currentPage)) { return Integer.parseInt(currentPage); } return null; } /** * * @param request * @return */ public static Integer getPageSize(HttpServletRequest request) { String pageSize = request.getParameter("pageSize"); if (StringUtils.isNotBlank(pageSize) && StringUtils.isNumeric(pageSize)) { return Integer.parseInt(pageSize); } return null; } /** * * @param request * @return */
public static User getUser(HttpServletRequest request) {
xujeff/tianti
tianti-org/src/main/java/com/jeff/tianti/org/entity/Resource.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // }
import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Transient; import com.jeff.tianti.common.entity.BaseEntity;
package com.jeff.tianti.org.entity; /** * 资源 * @author Jeff Xu * */ @Entity @Table(name = "org_resource")
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // } // Path: tianti-org/src/main/java/com/jeff/tianti/org/entity/Resource.java import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Transient; import com.jeff.tianti.common.entity.BaseEntity; package com.jeff.tianti.org.entity; /** * 资源 * @author Jeff Xu * */ @Entity @Table(name = "org_resource")
public class Resource extends BaseEntity{
xujeff/tianti
tianti-org/src/main/java/com/jeff/tianti/org/entity/User.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // }
import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OrderBy; import javax.persistence.Table; import org.hibernate.annotations.Where; import com.jeff.tianti.common.entity.BaseEntity;
package com.jeff.tianti.org.entity; /** * 系统用户 * @author Jeff Xu * */ @Entity @Table(name = "org_user") @Inheritance(strategy = InheritanceType.JOINED)
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // } // Path: tianti-org/src/main/java/com/jeff/tianti/org/entity/User.java import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OrderBy; import javax.persistence.Table; import org.hibernate.annotations.Where; import com.jeff.tianti.common.entity.BaseEntity; package com.jeff.tianti.org.entity; /** * 系统用户 * @author Jeff Xu * */ @Entity @Table(name = "org_user") @Inheritance(strategy = InheritanceType.JOINED)
public class User extends BaseEntity{
xujeff/tianti
tianti-cms/src/main/java/com/jeff/tianti/cms/entity/Article.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // }
import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.jeff.tianti.common.entity.BaseEntity;
package com.jeff.tianti.cms.entity; /** * 文章信息实体 * @author Jeff Xu */ @Entity @Table(name = "cms_article")
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // } // Path: tianti-cms/src/main/java/com/jeff/tianti/cms/entity/Article.java import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.jeff.tianti.common.entity.BaseEntity; package com.jeff.tianti.cms.entity; /** * 文章信息实体 * @author Jeff Xu */ @Entity @Table(name = "cms_article")
public class Article extends BaseEntity{
xujeff/tianti
tianti-common/src/main/java/com/jeff/tianti/common/dao/CustomBaseSqlDaoImpl.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/PageModel.java // public class PageModel<E> implements Serializable { // // private static final long serialVersionUID = 3265524976080127173L; // // private int totalCount; //总记录数 // // private int pageSize = 10; //每页显示的数量 // // private int totalPage; //总页数 // // private int currentPage = 1; //当前页数 // // private List<E> list; //分页集合列表 // // private String url; //分页跳转的URL // // public PageModel() { // } // // public PageModel(int pageSize) { // this.pageSize = pageSize; // } // // public int getTotalCount() { // return totalCount; // } // // public void setTotalCount(int totalCount) { // this.totalCount = totalCount; // } // // public int getPageSize() { // return pageSize; // } // // public void setPageSize(int pageSize) { // this.pageSize = pageSize; // } // // public int getTotalPage() { // return totalPage; // } // // public void setTotalPage(int totalPage) { // this.totalPage = totalPage; // } // // public int getCurrentPage() { // return currentPage; // } // // public void setCurrentPage(int currentPage) { // this.currentPage = currentPage; // } // // public List<E> getList() { // return list; // } // // public void setList(List<E> list) { // this.list = list; // } // // public String getUrl() { // return url; // } // // public void setUrl(String url) { // this.url = url; // } // // // }
import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.persistence.EntityManager; import javax.persistence.Query; import org.hibernate.SQLQuery; import org.hibernate.criterion.CriteriaSpecification; import org.springframework.beans.factory.annotation.Autowired; import com.jeff.tianti.common.entity.PageModel;
if(params instanceof List){ List<Object> paramList = (List<Object>) params; for(int i = 0, size = paramList.size(); i < size; i++){ qry.setParameter(i+1, paramList.get(i)); } }else if(params instanceof Map){ Map<String, Object> paramMap = (Map<String, Object>) params; for(String key : paramMap.keySet()){ qry.setParameter(key, paramMap.get(key)); } } } if (currentPage != null && rowsInPage != null) {//判断是否有分页 // 起始对象位置 qry.setFirstResult(rowsInPage * (currentPage - 1)); // 查询对象个数 qry.setMaxResults(rowsInPage); } s.setResultTransformer(CriteriaSpecification.ALIAS_TO_ENTITY_MAP); List<Map<String, Object>> resultList=new ArrayList<Map<String, Object>>(); try { resultList=s.list(); } catch (Exception e) { }finally{ em.close(); } return resultList; }
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/PageModel.java // public class PageModel<E> implements Serializable { // // private static final long serialVersionUID = 3265524976080127173L; // // private int totalCount; //总记录数 // // private int pageSize = 10; //每页显示的数量 // // private int totalPage; //总页数 // // private int currentPage = 1; //当前页数 // // private List<E> list; //分页集合列表 // // private String url; //分页跳转的URL // // public PageModel() { // } // // public PageModel(int pageSize) { // this.pageSize = pageSize; // } // // public int getTotalCount() { // return totalCount; // } // // public void setTotalCount(int totalCount) { // this.totalCount = totalCount; // } // // public int getPageSize() { // return pageSize; // } // // public void setPageSize(int pageSize) { // this.pageSize = pageSize; // } // // public int getTotalPage() { // return totalPage; // } // // public void setTotalPage(int totalPage) { // this.totalPage = totalPage; // } // // public int getCurrentPage() { // return currentPage; // } // // public void setCurrentPage(int currentPage) { // this.currentPage = currentPage; // } // // public List<E> getList() { // return list; // } // // public void setList(List<E> list) { // this.list = list; // } // // public String getUrl() { // return url; // } // // public void setUrl(String url) { // this.url = url; // } // // // } // Path: tianti-common/src/main/java/com/jeff/tianti/common/dao/CustomBaseSqlDaoImpl.java import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.persistence.EntityManager; import javax.persistence.Query; import org.hibernate.SQLQuery; import org.hibernate.criterion.CriteriaSpecification; import org.springframework.beans.factory.annotation.Autowired; import com.jeff.tianti.common.entity.PageModel; if(params instanceof List){ List<Object> paramList = (List<Object>) params; for(int i = 0, size = paramList.size(); i < size; i++){ qry.setParameter(i+1, paramList.get(i)); } }else if(params instanceof Map){ Map<String, Object> paramMap = (Map<String, Object>) params; for(String key : paramMap.keySet()){ qry.setParameter(key, paramMap.get(key)); } } } if (currentPage != null && rowsInPage != null) {//判断是否有分页 // 起始对象位置 qry.setFirstResult(rowsInPage * (currentPage - 1)); // 查询对象个数 qry.setMaxResults(rowsInPage); } s.setResultTransformer(CriteriaSpecification.ALIAS_TO_ENTITY_MAP); List<Map<String, Object>> resultList=new ArrayList<Map<String, Object>>(); try { resultList=s.list(); } catch (Exception e) { }finally{ em.close(); } return resultList; }
public PageModel<Map<String, Object>> querySqlObjects(String sql,
xujeff/tianti
tianti-cms/src/main/java/com/jeff/tianti/cms/entity/ColumnInfo.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // }
import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.jeff.tianti.common.entity.BaseEntity;
package com.jeff.tianti.cms.entity; /** * 栏目信息实体 * @author Jeff Xu */ @Entity @Table(name = "cms_column_info")
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // } // Path: tianti-cms/src/main/java/com/jeff/tianti/cms/entity/ColumnInfo.java import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.jeff.tianti.common.entity.BaseEntity; package com.jeff.tianti.cms.entity; /** * 栏目信息实体 * @author Jeff Xu */ @Entity @Table(name = "cms_column_info")
public class ColumnInfo extends BaseEntity{
xujeff/tianti
tianti-org/src/main/java/com/jeff/tianti/org/entity/Role.java
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // }
import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import com.jeff.tianti.common.entity.BaseEntity;
package com.jeff.tianti.org.entity; /** * 角色管理 * @author Jianfang Xu * */ @Entity @Table(name = "org_role")
// Path: tianti-common/src/main/java/com/jeff/tianti/common/entity/BaseEntity.java // @MappedSuperclass // public class BaseEntity extends MysqlSequenceIdEntity implements Serializable{ // // private static final long serialVersionUID = -4498233384948128317L; // // //逻辑删除标识位—已删除状态 // public static final String DELETE_FLAG_DELETED = "1"; // // //逻辑删除标识位—未删除状态 // public static final String DELETE_FLAG_NORMAL = "0"; // // //审核状态标识位—未审核 // public static final String AUDIT_FLAG_NOT = "0"; // // //审核状态标识位—审核通过 // public static final String AUDIT_FLAG_PASS = "1"; // // //审核状态标识位—审核通不过 // public static final String AUDIT_FLAG_FAIL = "2"; // // /** // * 创建日期 // */ // protected Date createDate; // /** // * 修改日期 // */ // protected Date updateDate; // // /** // * 删除标志(0-正常,1-删除) // * @return // */ // protected String deleteFlag; // // /** // * 审核状态(0-未审核,1-审核通过,2-审核不通过) // * @return // */ // protected String auditFlag; // // @Column(name = "create_date", updatable = false) // public Date getCreateDate() { // return createDate; // } // // public void setCreateDate(Date createDate) { // this.createDate = createDate; // } // // @Column(name = "update_date") // public Date getUpdateDate() { // return updateDate; // } // // public void setUpdateDate(Date updateDate) { // this.updateDate = updateDate; // } // // @Column(name = "delete_flag",length=1) // public String getDeleteFlag() { // return deleteFlag; // } // // public void setDeleteFlag(String deleteFlag) { // this.deleteFlag = deleteFlag; // } // // @Column(name = "audit_flag",length=2) // public String getAuditFlag() { // return auditFlag; // } // // public void setAuditFlag(String auditFlag) { // this.auditFlag = auditFlag; // } // // @Override // public boolean equals(Object object) { // if (object == null) { // return false; // } // if (object instanceof BaseEntity) { // BaseEntity baseEntity = (BaseEntity) object; // if (this.getId() == null || baseEntity.getId() == null) { // return false; // } else { // return (this.getId().equals(baseEntity.getId())); // } // } // return false; // } // // @Override // public int hashCode() { // return id == null ? System.identityHashCode(this) : (this.getClass().getName() + this.getId()).hashCode(); // } // // @PrePersist // public void prePersist() { // if(this.createDate == null){ // this.setCreateDate(new Date()); // } // this.setUpdateDate(new Date()); // if(StringUtils.isBlank(this.getDeleteFlag())){ // this.setDeleteFlag(BaseEntity.DELETE_FLAG_NORMAL); // } // } // // @PreUpdate // public void preUpdate() { // this.setUpdateDate(new Date()); // } // // } // Path: tianti-org/src/main/java/com/jeff/tianti/org/entity/Role.java import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import com.jeff.tianti.common.entity.BaseEntity; package com.jeff.tianti.org.entity; /** * 角色管理 * @author Jianfang Xu * */ @Entity @Table(name = "org_role")
public class Role extends BaseEntity{
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/presentation/model/FileViewModel.java
// Path: app/src/main/java/com/paulds/simpleftp/data/entities/FileEntity.java // public class FileEntity implements Comparable<FileEntity> { // // /** // * The file name. // */ // private String name; // // /** // * The file path. // */ // private String path; // // /** // * The file size. // */ // private Long size; // // /** // * Indicates whether this file is a directory. // */ // private boolean isDirectory; // // /** // * Gets the file name. // * @return The file name. // */ // public String getName() { // return name; // } // // /** // * Sets the file name. // * @param name The file name. // */ // public void setName(String name) { // this.name = name; // } // // /** // * Gets the file path. // * @return The file path. // */ // public String getPath() { // return path; // } // // /** // * Sets the file path. // * @param path The file path. // */ // public void setPath(String path) { // this.path = path; // } // // /** // * Gets the file size. // * @return The file size. // */ // public Long getSize() { // return size; // } // // /** // * Sets the file size. // * @param size The file size. // */ // public void setSize(long size) { // this.size = size; // } // // /** // * Indicates whether this file is a directory. // * @return true if the file is a directory; false otherwise // */ // public boolean isDirectory() { // return isDirectory; // } // // /** // * Set a value indicating whether this file is a directory. // * @param isDirectory true if the file is a directory; false otherwise // */ // public void setIsDirectory(boolean isDirectory) { // this.isDirectory = isDirectory; // } // // /** // * {@inheritDoc} // */ // @Override // public int compareTo(FileEntity file) { // if(this.isDirectory() && !file.isDirectory()) { // return -1; // } // else if(!this.isDirectory() && file.isDirectory()) { // return 1; // } // else { // return this.getName().compareToIgnoreCase(file.getName()); // } // } // }
import android.databinding.Bindable; import android.databinding.ObservableBoolean; import android.view.View; import com.paulds.simpleftp.R; import com.paulds.simpleftp.data.entities.FileEntity;
package com.paulds.simpleftp.presentation.model; /** * Model for displaying a file in a view. * * @author Paul-DS */ public class FileViewModel { /** * The main view model */ private ExplorerViewModel mainViewModel; /** * A value indicating whether this file is a directory. */ private boolean isDirectory; /** * The file name. */ private String name; /** * The file path. */ private String path; /** * The file size. */ private Long size; /** * The icon representing the file. */ private int icon; /** * Indicates whether the file item is selected. */ public ObservableBoolean isSelected; /** * Default constructor. * @param mainViewModel The parent view model. */ public FileViewModel(ExplorerViewModel mainViewModel) { this.mainViewModel = mainViewModel; this.isSelected = new ObservableBoolean(false); } /** * Constructor with initialization. * @param mainViewModel The parent view model. * @param file The file to display. */
// Path: app/src/main/java/com/paulds/simpleftp/data/entities/FileEntity.java // public class FileEntity implements Comparable<FileEntity> { // // /** // * The file name. // */ // private String name; // // /** // * The file path. // */ // private String path; // // /** // * The file size. // */ // private Long size; // // /** // * Indicates whether this file is a directory. // */ // private boolean isDirectory; // // /** // * Gets the file name. // * @return The file name. // */ // public String getName() { // return name; // } // // /** // * Sets the file name. // * @param name The file name. // */ // public void setName(String name) { // this.name = name; // } // // /** // * Gets the file path. // * @return The file path. // */ // public String getPath() { // return path; // } // // /** // * Sets the file path. // * @param path The file path. // */ // public void setPath(String path) { // this.path = path; // } // // /** // * Gets the file size. // * @return The file size. // */ // public Long getSize() { // return size; // } // // /** // * Sets the file size. // * @param size The file size. // */ // public void setSize(long size) { // this.size = size; // } // // /** // * Indicates whether this file is a directory. // * @return true if the file is a directory; false otherwise // */ // public boolean isDirectory() { // return isDirectory; // } // // /** // * Set a value indicating whether this file is a directory. // * @param isDirectory true if the file is a directory; false otherwise // */ // public void setIsDirectory(boolean isDirectory) { // this.isDirectory = isDirectory; // } // // /** // * {@inheritDoc} // */ // @Override // public int compareTo(FileEntity file) { // if(this.isDirectory() && !file.isDirectory()) { // return -1; // } // else if(!this.isDirectory() && file.isDirectory()) { // return 1; // } // else { // return this.getName().compareToIgnoreCase(file.getName()); // } // } // } // Path: app/src/main/java/com/paulds/simpleftp/presentation/model/FileViewModel.java import android.databinding.Bindable; import android.databinding.ObservableBoolean; import android.view.View; import com.paulds.simpleftp.R; import com.paulds.simpleftp.data.entities.FileEntity; package com.paulds.simpleftp.presentation.model; /** * Model for displaying a file in a view. * * @author Paul-DS */ public class FileViewModel { /** * The main view model */ private ExplorerViewModel mainViewModel; /** * A value indicating whether this file is a directory. */ private boolean isDirectory; /** * The file name. */ private String name; /** * The file path. */ private String path; /** * The file size. */ private Long size; /** * The icon representing the file. */ private int icon; /** * Indicates whether the file item is selected. */ public ObservableBoolean isSelected; /** * Default constructor. * @param mainViewModel The parent view model. */ public FileViewModel(ExplorerViewModel mainViewModel) { this.mainViewModel = mainViewModel; this.isSelected = new ObservableBoolean(false); } /** * Constructor with initialization. * @param mainViewModel The parent view model. * @param file The file to display. */
public FileViewModel(ExplorerViewModel mainViewModel, FileEntity file) {
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/presentation/activities/EditServerActivity.java
// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/EditServerViewModel.java // public class EditServerViewModel extends FormViewModel { // /** // * The activity context. // */ // private Activity context; // // /** // * The server id. // */ // public int id; // // /** // * The server name. // */ // public FieldViewModel<String> name; // // /** // * The server host. // */ // public FieldViewModel<String> host; // // /** // * The server port. // */ // public FieldViewModel<String> port; // // /** // * A value indicating whether the connection must be anonymous. // */ // public FieldViewModel<Boolean> isAnonymous; // // /** // * The login used to connect the server. // */ // public FieldViewModel<String> login; // // /** // * The password used to connect the server. // */ // public FieldViewModel<String> password; // // /** // * Default constructor (for creation). // * @param context The context of the current activity. // */ // public EditServerViewModel(Activity context) { // this.context = context; // this.name = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError(this.get() == null || this.get().isEmpty() // ? "Please fill a name for this server." // : null); // } // }; // // this.host = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError(this.get() == null || this.get().isEmpty() // ? "Please fill the server host." // : null); // } // }; // // this.port = new FieldViewModel<String>("21"){ // @Override // public void onValidate() { // this.setError(!TextUtils.isDigitsOnly(this.get()) ? "Incorrect port." : null); // } // }; // // this.isAnonymous = new FieldViewModel<Boolean>(); // // this.login = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError((isAnonymous.get() == null || !isAnonymous.get().booleanValue()) && (this.get() == null || this.get().isEmpty()) // ? "Please fill the login for FTP connection." // : null); // } // }; // // this.password = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError((isAnonymous.get() == null || !isAnonymous.get().booleanValue()) && (this.get() == null || this.get().isEmpty()) // ? "Please fill the password for FTP connection." // : null); // } // }; // } // // /** // * Constructor for edition. // * @param context The context of the current activity. // * @param serverId The identifier of the server to edit. // */ // public EditServerViewModel(Activity context, int serverId) { // this(context); // // FtpServer server = AndroidApplication.getRepository().getServerRepository().getServer(serverId); // this.id = serverId; // this.name.set(server.getName()); // this.host.set(server.getHost()); // this.port.set(String.valueOf(server.getPort())); // this.isAnonymous.set(server.isAnonymous()); // this.login.set(server.getLogin()); // this.password.set(server.getPassword()); // } // // /** // * Gets the resource for activity title. // * @return The resource to display activity title. // */ // @Bindable // public int getTitleResource() { // return this.id > 0 ? R.string.activity_edit_server_title : R.string.activity_add_server_title; // } // // /** // * Back to the previous activity. // * @param view The current view // */ // public void back(View view) { // this.context.finish(); // } // // /** // * Create the server. // * @param view The current view // */ // public void createServer(View view) { // if(this.validate()) // { // FtpServer server = new FtpServer(); // // server.setId(this.id); // server.setName(this.name.get()); // server.setHost(this.host.get()); // server.setPort(TextUtils.isDigitsOnly(this.port.get()) ? Integer.parseInt(this.port.get()) : 21); // server.setIsAnonymous(this.isAnonymous.get()); // server.setLogin(this.login.get()); // server.setPassword(this.password.get()); // // if(this.id > 0) { // AndroidApplication.getRepository().getServerRepository().updateServer(server); // } // else { // AndroidApplication.getRepository().getServerRepository().addServer(server); // } // // this.context.setResult(Activity.RESULT_OK); // this.context.finish(); // } // } // }
import android.databinding.DataBindingUtil; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.paulds.simpleftp.R; import com.paulds.simpleftp.databinding.ActivityEditServerBinding; import com.paulds.simpleftp.presentation.model.EditServerViewModel;
package com.paulds.simpleftp.presentation.activities; /** * Activity which allows to add a new FTP server. * * @author Paul-DS */ public class EditServerActivity extends AppCompatActivity { /** * Method called at activity creation. * @param savedInstanceState The saved instance state. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityEditServerBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_edit_server);
// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/EditServerViewModel.java // public class EditServerViewModel extends FormViewModel { // /** // * The activity context. // */ // private Activity context; // // /** // * The server id. // */ // public int id; // // /** // * The server name. // */ // public FieldViewModel<String> name; // // /** // * The server host. // */ // public FieldViewModel<String> host; // // /** // * The server port. // */ // public FieldViewModel<String> port; // // /** // * A value indicating whether the connection must be anonymous. // */ // public FieldViewModel<Boolean> isAnonymous; // // /** // * The login used to connect the server. // */ // public FieldViewModel<String> login; // // /** // * The password used to connect the server. // */ // public FieldViewModel<String> password; // // /** // * Default constructor (for creation). // * @param context The context of the current activity. // */ // public EditServerViewModel(Activity context) { // this.context = context; // this.name = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError(this.get() == null || this.get().isEmpty() // ? "Please fill a name for this server." // : null); // } // }; // // this.host = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError(this.get() == null || this.get().isEmpty() // ? "Please fill the server host." // : null); // } // }; // // this.port = new FieldViewModel<String>("21"){ // @Override // public void onValidate() { // this.setError(!TextUtils.isDigitsOnly(this.get()) ? "Incorrect port." : null); // } // }; // // this.isAnonymous = new FieldViewModel<Boolean>(); // // this.login = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError((isAnonymous.get() == null || !isAnonymous.get().booleanValue()) && (this.get() == null || this.get().isEmpty()) // ? "Please fill the login for FTP connection." // : null); // } // }; // // this.password = new FieldViewModel<String>(){ // @Override // public void onValidate() { // this.setError((isAnonymous.get() == null || !isAnonymous.get().booleanValue()) && (this.get() == null || this.get().isEmpty()) // ? "Please fill the password for FTP connection." // : null); // } // }; // } // // /** // * Constructor for edition. // * @param context The context of the current activity. // * @param serverId The identifier of the server to edit. // */ // public EditServerViewModel(Activity context, int serverId) { // this(context); // // FtpServer server = AndroidApplication.getRepository().getServerRepository().getServer(serverId); // this.id = serverId; // this.name.set(server.getName()); // this.host.set(server.getHost()); // this.port.set(String.valueOf(server.getPort())); // this.isAnonymous.set(server.isAnonymous()); // this.login.set(server.getLogin()); // this.password.set(server.getPassword()); // } // // /** // * Gets the resource for activity title. // * @return The resource to display activity title. // */ // @Bindable // public int getTitleResource() { // return this.id > 0 ? R.string.activity_edit_server_title : R.string.activity_add_server_title; // } // // /** // * Back to the previous activity. // * @param view The current view // */ // public void back(View view) { // this.context.finish(); // } // // /** // * Create the server. // * @param view The current view // */ // public void createServer(View view) { // if(this.validate()) // { // FtpServer server = new FtpServer(); // // server.setId(this.id); // server.setName(this.name.get()); // server.setHost(this.host.get()); // server.setPort(TextUtils.isDigitsOnly(this.port.get()) ? Integer.parseInt(this.port.get()) : 21); // server.setIsAnonymous(this.isAnonymous.get()); // server.setLogin(this.login.get()); // server.setPassword(this.password.get()); // // if(this.id > 0) { // AndroidApplication.getRepository().getServerRepository().updateServer(server); // } // else { // AndroidApplication.getRepository().getServerRepository().addServer(server); // } // // this.context.setResult(Activity.RESULT_OK); // this.context.finish(); // } // } // } // Path: app/src/main/java/com/paulds/simpleftp/presentation/activities/EditServerActivity.java import android.databinding.DataBindingUtil; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.paulds.simpleftp.R; import com.paulds.simpleftp.databinding.ActivityEditServerBinding; import com.paulds.simpleftp.presentation.model.EditServerViewModel; package com.paulds.simpleftp.presentation.activities; /** * Activity which allows to add a new FTP server. * * @author Paul-DS */ public class EditServerActivity extends AppCompatActivity { /** * Method called at activity creation. * @param savedInstanceState The saved instance state. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityEditServerBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_edit_server);
EditServerViewModel viewModel = null;
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/data/repository/ServerRepository.java
// Path: app/src/main/java/com/paulds/simpleftp/data/entities/FtpServer.java // public class FtpServer extends DatabaseEntity { // /** // * The named used to display the FTP server. // */ // private String name; // // /** // * The FTP server host name. // */ // private String host; // // /** // * A value indicating whether a login/password must be used for FTP connection. // */ // private boolean isAnonymous; // // /** // * The login used for FTP connection. // */ // private String login; // // /** // * The password used for FTP connection. // */ // private String password; // // /** // * The port used for FTP connection. // */ // private int port; // // /** // * Gets the name used to display the FTP server. // * @return The server name. // */ // public String getName() { // return name; // } // // /** // * Sets the name used to display the FTP server. // * @param name The server name. // */ // public void setName(String name) { // this.name = name; // } // // /** // * Gets the FTP server host name. // * @return The FTP server host name. // */ // public String getHost() { // return host; // } // // /** // * Sets the FTP server host name. // * @param host The FTP server host name. // */ // public void setHost(String host) { // this.host = host; // } // // /** // * Gets a value indicating whether a login/password must be used for FTP connection. // * @return A value indicating whether a login/password must be used for FTP connection. // */ // public boolean isAnonymous() { // return isAnonymous; // } // // /** // * Sets a value indicating whether a login/password must be used for FTP connection. // * param isAnonymous A value indicating whether a login/password must be used for FTP connection. // */ // public void setIsAnonymous(boolean isAnonymous) { // this.isAnonymous = isAnonymous; // } // // /** // * Gets the login used for FTP connection. // * @return The login used for FTP connection. // */ // public String getLogin() { // return login; // } // // /** // * Sets the login used for FTP connection. // * @param login The login used for FTP connection. // */ // public void setLogin(String login) { // this.login = login; // } // // /** // * Gets the password used for FTP connection. // * @return The password used for FTP connection. // */ // public String getPassword() { // return password; // } // // /** // * Sets the password used for FTP connection. // * @param password The password used for FTP connection. // */ // public void setPassword(String password) { // this.password = password; // } // // /** // * Gets the port used for FTP connection. // * @return The port used for FTP connection. // */ // public int getPort() { // return port; // } // // /** // * Sets the port used for FTP connection. // * @param port The port used for FTP connection. // */ // public void setPort(int port) { // this.port = port; // } // } // // Path: app/src/main/java/com/paulds/simpleftp/data/helpers/DatabaseHelper.java // public class DatabaseHelper extends SQLiteOpenHelper { // private static final String DATABASE_NAME = "simpleftp.db"; // private static final int DATABASE_VERSION = 1; // // public static final String TABLE_SERVER = "server"; // public static final String COLUMN_ID = "_id"; // public static final String COLUMN_NAME = "name"; // public static final String COLUMN_HOST = "host"; // public static final String COLUMN_ANONYMOUS = "anonymous"; // public static final String COLUMN_LOGIN = "login"; // public static final String COLUMN_PASSWORD = "password"; // public static final String COLUMN_PORT = "port"; // // // Commande sql pour la création de la base de données // private static final String DATABASE_CREATE = "create table " + TABLE_SERVER + "(" // + COLUMN_ID + " integer primary key autoincrement, " // + COLUMN_NAME + " text not null," // + COLUMN_HOST + " text not null," // + COLUMN_ANONYMOUS + " int not null," // + COLUMN_LOGIN + " text null," // + COLUMN_PASSWORD + " text null," // + COLUMN_PORT + " int not null);"; // // public DatabaseHelper(Context context) { // super(context, DATABASE_NAME, null, DATABASE_VERSION); // } // // @Override // public void onCreate(SQLiteDatabase database) { // database.execSQL(DATABASE_CREATE); // } // // @Override // public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // Log.w(DatabaseHelper.class.getName(), // "Upgrading database from version " + oldVersion + " to " // + newVersion + ", which will destroy all old data"); // db.execSQL("DROP TABLE IF EXISTS " + TABLE_SERVER); // onCreate(db); // } // }
import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract; import com.paulds.simpleftp.data.entities.FtpServer; import com.paulds.simpleftp.data.helpers.DatabaseHelper; import java.util.ArrayList; import java.util.List;
package com.paulds.simpleftp.data.repository; /** * This class provide an access to servers object. * * @author Paul-DS */ public class ServerRepository { /** * The database. */ private SQLiteDatabase database; /** * The database helper used to access database. */
// Path: app/src/main/java/com/paulds/simpleftp/data/entities/FtpServer.java // public class FtpServer extends DatabaseEntity { // /** // * The named used to display the FTP server. // */ // private String name; // // /** // * The FTP server host name. // */ // private String host; // // /** // * A value indicating whether a login/password must be used for FTP connection. // */ // private boolean isAnonymous; // // /** // * The login used for FTP connection. // */ // private String login; // // /** // * The password used for FTP connection. // */ // private String password; // // /** // * The port used for FTP connection. // */ // private int port; // // /** // * Gets the name used to display the FTP server. // * @return The server name. // */ // public String getName() { // return name; // } // // /** // * Sets the name used to display the FTP server. // * @param name The server name. // */ // public void setName(String name) { // this.name = name; // } // // /** // * Gets the FTP server host name. // * @return The FTP server host name. // */ // public String getHost() { // return host; // } // // /** // * Sets the FTP server host name. // * @param host The FTP server host name. // */ // public void setHost(String host) { // this.host = host; // } // // /** // * Gets a value indicating whether a login/password must be used for FTP connection. // * @return A value indicating whether a login/password must be used for FTP connection. // */ // public boolean isAnonymous() { // return isAnonymous; // } // // /** // * Sets a value indicating whether a login/password must be used for FTP connection. // * param isAnonymous A value indicating whether a login/password must be used for FTP connection. // */ // public void setIsAnonymous(boolean isAnonymous) { // this.isAnonymous = isAnonymous; // } // // /** // * Gets the login used for FTP connection. // * @return The login used for FTP connection. // */ // public String getLogin() { // return login; // } // // /** // * Sets the login used for FTP connection. // * @param login The login used for FTP connection. // */ // public void setLogin(String login) { // this.login = login; // } // // /** // * Gets the password used for FTP connection. // * @return The password used for FTP connection. // */ // public String getPassword() { // return password; // } // // /** // * Sets the password used for FTP connection. // * @param password The password used for FTP connection. // */ // public void setPassword(String password) { // this.password = password; // } // // /** // * Gets the port used for FTP connection. // * @return The port used for FTP connection. // */ // public int getPort() { // return port; // } // // /** // * Sets the port used for FTP connection. // * @param port The port used for FTP connection. // */ // public void setPort(int port) { // this.port = port; // } // } // // Path: app/src/main/java/com/paulds/simpleftp/data/helpers/DatabaseHelper.java // public class DatabaseHelper extends SQLiteOpenHelper { // private static final String DATABASE_NAME = "simpleftp.db"; // private static final int DATABASE_VERSION = 1; // // public static final String TABLE_SERVER = "server"; // public static final String COLUMN_ID = "_id"; // public static final String COLUMN_NAME = "name"; // public static final String COLUMN_HOST = "host"; // public static final String COLUMN_ANONYMOUS = "anonymous"; // public static final String COLUMN_LOGIN = "login"; // public static final String COLUMN_PASSWORD = "password"; // public static final String COLUMN_PORT = "port"; // // // Commande sql pour la création de la base de données // private static final String DATABASE_CREATE = "create table " + TABLE_SERVER + "(" // + COLUMN_ID + " integer primary key autoincrement, " // + COLUMN_NAME + " text not null," // + COLUMN_HOST + " text not null," // + COLUMN_ANONYMOUS + " int not null," // + COLUMN_LOGIN + " text null," // + COLUMN_PASSWORD + " text null," // + COLUMN_PORT + " int not null);"; // // public DatabaseHelper(Context context) { // super(context, DATABASE_NAME, null, DATABASE_VERSION); // } // // @Override // public void onCreate(SQLiteDatabase database) { // database.execSQL(DATABASE_CREATE); // } // // @Override // public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // Log.w(DatabaseHelper.class.getName(), // "Upgrading database from version " + oldVersion + " to " // + newVersion + ", which will destroy all old data"); // db.execSQL("DROP TABLE IF EXISTS " + TABLE_SERVER); // onCreate(db); // } // } // Path: app/src/main/java/com/paulds/simpleftp/data/repository/ServerRepository.java import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract; import com.paulds.simpleftp.data.entities.FtpServer; import com.paulds.simpleftp.data.helpers.DatabaseHelper; import java.util.ArrayList; import java.util.List; package com.paulds.simpleftp.data.repository; /** * This class provide an access to servers object. * * @author Paul-DS */ public class ServerRepository { /** * The database. */ private SQLiteDatabase database; /** * The database helper used to access database. */
private DatabaseHelper dbHelper;
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/presentation/adapters/BindingRecyclerViewAdapter.java
// Path: app/src/main/java/com/paulds/simpleftp/presentation/binders/ItemBinder.java // public class ItemBinder<T> // { // /** // * The id of the binding variable used in recycler view item layout. // */ // protected final int bindingVariable; // // /** // * The id of the layout used for displaying recycler view item. // */ // protected final int layoutId; // // /** // * Default constructor. // * @param bindingVariable The id of the binding variable. // * @param layoutId The id of the layout used for displaying recycler view item. // */ // public ItemBinder(int bindingVariable, int layoutId) // { // this.bindingVariable = bindingVariable; // this.layoutId = layoutId; // } // // /** // * Gets the id of the layout used for displaying recycler view item. // * @return The layout id. // */ // public int getLayoutId() // { // return layoutId; // } // // /** // * Gets the binding variable used in recycler view item layout. // * @return The binding variable. // */ // public int getBindingVariable() // { // return bindingVariable; // } // }
import android.databinding.DataBindingUtil; import android.databinding.ObservableArrayList; import android.databinding.ObservableList; import android.databinding.ViewDataBinding; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.paulds.simpleftp.presentation.binders.ItemBinder; import java.lang.ref.WeakReference; import java.util.Collection;
package com.paulds.simpleftp.presentation.adapters; /** * Adapter for data binding usage of recycler view. * @param <T> The type of object to display in the recycler view. */ public class BindingRecyclerViewAdapter<T> extends RecyclerView.Adapter<BindingRecyclerViewAdapter.ViewHolder> { /** * Key used to store the item model. */ private static final int ITEM_MODEL = -124; /** * The callback triggered when the list of items change. */ private final WeakReferenceOnListChangedCallback onListChangedCallback; /** * The binder used for items display. */
// Path: app/src/main/java/com/paulds/simpleftp/presentation/binders/ItemBinder.java // public class ItemBinder<T> // { // /** // * The id of the binding variable used in recycler view item layout. // */ // protected final int bindingVariable; // // /** // * The id of the layout used for displaying recycler view item. // */ // protected final int layoutId; // // /** // * Default constructor. // * @param bindingVariable The id of the binding variable. // * @param layoutId The id of the layout used for displaying recycler view item. // */ // public ItemBinder(int bindingVariable, int layoutId) // { // this.bindingVariable = bindingVariable; // this.layoutId = layoutId; // } // // /** // * Gets the id of the layout used for displaying recycler view item. // * @return The layout id. // */ // public int getLayoutId() // { // return layoutId; // } // // /** // * Gets the binding variable used in recycler view item layout. // * @return The binding variable. // */ // public int getBindingVariable() // { // return bindingVariable; // } // } // Path: app/src/main/java/com/paulds/simpleftp/presentation/adapters/BindingRecyclerViewAdapter.java import android.databinding.DataBindingUtil; import android.databinding.ObservableArrayList; import android.databinding.ObservableList; import android.databinding.ViewDataBinding; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.paulds.simpleftp.presentation.binders.ItemBinder; import java.lang.ref.WeakReference; import java.util.Collection; package com.paulds.simpleftp.presentation.adapters; /** * Adapter for data binding usage of recycler view. * @param <T> The type of object to display in the recycler view. */ public class BindingRecyclerViewAdapter<T> extends RecyclerView.Adapter<BindingRecyclerViewAdapter.ViewHolder> { /** * Key used to store the item model. */ private static final int ITEM_MODEL = -124; /** * The callback triggered when the list of items change. */ private final WeakReferenceOnListChangedCallback onListChangedCallback; /** * The binder used for items display. */
private final ItemBinder<T> itemBinder;
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/presentation/model/MainViewModel.java
// Path: app/src/main/java/com/paulds/simpleftp/presentation/activities/ListServerActivity.java // public class ListServerActivity extends AppCompatActivity { // // public static final int KEY_EDIT_SERVER = 199; // // /** // * The activity binding. // */ // ActivityListServerBinding binding; // // /** // * The current view model. // */ // ListServerViewModel viewModel; // // /** // * Method called at activity creation. // * @param savedInstanceState The saved instance state. // */ // @Override // protected void onCreate(Bundle savedInstanceState) { // super.onCreate(savedInstanceState); // // binding = DataBindingUtil.setContentView(this, R.layout.activity_list_server); // viewModel = new ListServerViewModel(this); // binding.setModel(viewModel); // binding.ListServerRecyclerView.setLayoutManager(new LinearLayoutManager(this)); // } // // /** // * Method called when resuming activity. // */ // @Override // protected void onResume() { // super.onResume(); // // this.viewModel.updateList(); // } // // @Override // protected void onActivityResult(int requestCode, int resultCode, Intent data) { // if (requestCode == KEY_EDIT_SERVER) { // if(resultCode == Activity.RESULT_OK){ // this.viewModel.selectedServerVisible.set(false); // } // } // } // // /** // * Method called when the back button is pressed. // */ // @Override // public void onBackPressed() { // if(viewModel.selectedServerVisible.get()) { // viewModel.closeServer(null); // } // else { // super.onBackPressed(); // } // } // }
import android.content.Context; import android.content.Intent; import android.databinding.BaseObservable; import android.databinding.Bindable; import android.databinding.ObservableArrayList; import android.view.View; import com.paulds.simpleftp.presentation.activities.ListServerActivity;
package com.paulds.simpleftp.presentation.model; /** * The view model for the main activity. * * @author Paul-DS */ public class MainViewModel extends BaseObservable { /** * The activity context. */ private Context context; /** * Default constructor. * @param context The context of the current activity. */ public MainViewModel(Context context) { this.context = context; } /** * Open the server list activity. * @param view The current view */ public void openParameters(View view) {
// Path: app/src/main/java/com/paulds/simpleftp/presentation/activities/ListServerActivity.java // public class ListServerActivity extends AppCompatActivity { // // public static final int KEY_EDIT_SERVER = 199; // // /** // * The activity binding. // */ // ActivityListServerBinding binding; // // /** // * The current view model. // */ // ListServerViewModel viewModel; // // /** // * Method called at activity creation. // * @param savedInstanceState The saved instance state. // */ // @Override // protected void onCreate(Bundle savedInstanceState) { // super.onCreate(savedInstanceState); // // binding = DataBindingUtil.setContentView(this, R.layout.activity_list_server); // viewModel = new ListServerViewModel(this); // binding.setModel(viewModel); // binding.ListServerRecyclerView.setLayoutManager(new LinearLayoutManager(this)); // } // // /** // * Method called when resuming activity. // */ // @Override // protected void onResume() { // super.onResume(); // // this.viewModel.updateList(); // } // // @Override // protected void onActivityResult(int requestCode, int resultCode, Intent data) { // if (requestCode == KEY_EDIT_SERVER) { // if(resultCode == Activity.RESULT_OK){ // this.viewModel.selectedServerVisible.set(false); // } // } // } // // /** // * Method called when the back button is pressed. // */ // @Override // public void onBackPressed() { // if(viewModel.selectedServerVisible.get()) { // viewModel.closeServer(null); // } // else { // super.onBackPressed(); // } // } // } // Path: app/src/main/java/com/paulds/simpleftp/presentation/model/MainViewModel.java import android.content.Context; import android.content.Intent; import android.databinding.BaseObservable; import android.databinding.Bindable; import android.databinding.ObservableArrayList; import android.view.View; import com.paulds.simpleftp.presentation.activities.ListServerActivity; package com.paulds.simpleftp.presentation.model; /** * The view model for the main activity. * * @author Paul-DS */ public class MainViewModel extends BaseObservable { /** * The activity context. */ private Context context; /** * Default constructor. * @param context The context of the current activity. */ public MainViewModel(Context context) { this.context = context; } /** * Open the server list activity. * @param view The current view */ public void openParameters(View view) {
Intent intent = new Intent(context, ListServerActivity.class);
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/presentation/binders/FormBindings.java
// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/FieldViewModel.java // public class FieldViewModel<T> extends BaseObservable { // /** // * Value of the field. // */ // private T mValue; // // /** // * Validation error to display on the field // */ // private String error; // // /** // * A value indicating whether the validation must be performed // * when the field is modified. // */ // private boolean isValidationEnabled = false; // // /** // * Constructor with initialization. // * // * @param value The initial value. // */ // public FieldViewModel(T value) { // mValue = value; // } // // /** // * Default constructor // */ // public FieldViewModel() { // } // // /** // * @return The stored value. // */ // public T get() { // return mValue; // } // // /** // * Set the stored value. // */ // public void set(T value) { // if (value != mValue) { // mValue = value; // notifyChange(); // // if(this.isValidationEnabled) { // this.onValidate(); // } // } // } // // /** // * Indicates whether the validation must be performed // * automatically when the field is modified. // */ // public boolean isValidationEnabled() { // return this.isValidationEnabled; // } // // /** // * Specify whether the validation must be performed // * automatically when the field is modified. // */ // public void setValidationEnabled(boolean isValidationEnabled) { // this.isValidationEnabled = isValidationEnabled; // } // // /** // * Gets the validation errors. // * @return The validation errors. // */ // public String getError() { // return this.error; // } // // /** // * Sets the validation errors. // * @param error The validation errors. // */ // protected void setError(String error) { // this.error = error; // } // // /** // * Validation method (to override) // */ // protected void onValidate() { // // } // // /** // * Execute the validation and indicates whether the field is valid. // * @return The value indicating whether the field is valid. // */ // public boolean isValid() { // String oldError = this.error; // this.onValidate(); // // if(this.error != oldError) { // notifyChange(); // } // // return this.error == null || this.error.isEmpty(); // } // }
import android.databinding.BaseObservable; import android.databinding.BindingAdapter; import android.databinding.ObservableField; import android.support.design.widget.TextInputLayout; import android.text.Editable; import android.text.TextWatcher; import android.util.Pair; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.Switch; import com.paulds.simpleftp.presentation.model.FieldViewModel; import org.w3c.dom.Text;
package com.paulds.simpleftp.presentation.binders; /** * Class used to defined bindings used in forms views. * * @author Paul-DS */ public class FormBindings { /** * Binding method for EditText * @param view The EditText widget. * @param observable The field value. */ @BindingAdapter("binding")
// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/FieldViewModel.java // public class FieldViewModel<T> extends BaseObservable { // /** // * Value of the field. // */ // private T mValue; // // /** // * Validation error to display on the field // */ // private String error; // // /** // * A value indicating whether the validation must be performed // * when the field is modified. // */ // private boolean isValidationEnabled = false; // // /** // * Constructor with initialization. // * // * @param value The initial value. // */ // public FieldViewModel(T value) { // mValue = value; // } // // /** // * Default constructor // */ // public FieldViewModel() { // } // // /** // * @return The stored value. // */ // public T get() { // return mValue; // } // // /** // * Set the stored value. // */ // public void set(T value) { // if (value != mValue) { // mValue = value; // notifyChange(); // // if(this.isValidationEnabled) { // this.onValidate(); // } // } // } // // /** // * Indicates whether the validation must be performed // * automatically when the field is modified. // */ // public boolean isValidationEnabled() { // return this.isValidationEnabled; // } // // /** // * Specify whether the validation must be performed // * automatically when the field is modified. // */ // public void setValidationEnabled(boolean isValidationEnabled) { // this.isValidationEnabled = isValidationEnabled; // } // // /** // * Gets the validation errors. // * @return The validation errors. // */ // public String getError() { // return this.error; // } // // /** // * Sets the validation errors. // * @param error The validation errors. // */ // protected void setError(String error) { // this.error = error; // } // // /** // * Validation method (to override) // */ // protected void onValidate() { // // } // // /** // * Execute the validation and indicates whether the field is valid. // * @return The value indicating whether the field is valid. // */ // public boolean isValid() { // String oldError = this.error; // this.onValidate(); // // if(this.error != oldError) { // notifyChange(); // } // // return this.error == null || this.error.isEmpty(); // } // } // Path: app/src/main/java/com/paulds/simpleftp/presentation/binders/FormBindings.java import android.databinding.BaseObservable; import android.databinding.BindingAdapter; import android.databinding.ObservableField; import android.support.design.widget.TextInputLayout; import android.text.Editable; import android.text.TextWatcher; import android.util.Pair; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.Switch; import com.paulds.simpleftp.presentation.model.FieldViewModel; import org.w3c.dom.Text; package com.paulds.simpleftp.presentation.binders; /** * Class used to defined bindings used in forms views. * * @author Paul-DS */ public class FormBindings { /** * Binding method for EditText * @param view The EditText widget. * @param observable The field value. */ @BindingAdapter("binding")
public static void bindEditText(EditText view, final FieldViewModel<String> observable) {
Paul-DS/SimpleFTP
app/src/main/java/com/paulds/simpleftp/presentation/activities/MainActivity.java
// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/MainViewModel.java // public class MainViewModel extends BaseObservable { // /** // * The activity context. // */ // private Context context; // // /** // * Default constructor. // * @param context The context of the current activity. // */ // public MainViewModel(Context context) { // this.context = context; // } // // /** // * Open the server list activity. // * @param view The current view // */ // public void openParameters(View view) { // Intent intent = new Intent(context, ListServerActivity.class); // context.startActivity(intent); // } // }
import android.databinding.DataBindingUtil; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import com.paulds.simpleftp.R; import com.paulds.simpleftp.databinding.ActivityMainBinding; import com.paulds.simpleftp.presentation.model.MainViewModel;
package com.paulds.simpleftp.presentation.activities; /** * The main activity, which displays 2 explorers * * @author Paul-DS */ public class MainActivity extends AppCompatActivity { /** * Method called at activity creation. * @param savedInstanceState The saved instance state. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/MainViewModel.java // public class MainViewModel extends BaseObservable { // /** // * The activity context. // */ // private Context context; // // /** // * Default constructor. // * @param context The context of the current activity. // */ // public MainViewModel(Context context) { // this.context = context; // } // // /** // * Open the server list activity. // * @param view The current view // */ // public void openParameters(View view) { // Intent intent = new Intent(context, ListServerActivity.class); // context.startActivity(intent); // } // } // Path: app/src/main/java/com/paulds/simpleftp/presentation/activities/MainActivity.java import android.databinding.DataBindingUtil; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import com.paulds.simpleftp.R; import com.paulds.simpleftp.databinding.ActivityMainBinding; import com.paulds.simpleftp.presentation.model.MainViewModel; package com.paulds.simpleftp.presentation.activities; /** * The main activity, which displays 2 explorers * * @author Paul-DS */ public class MainActivity extends AppCompatActivity { /** * Method called at activity creation. * @param savedInstanceState The saved instance state. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
MainViewModel viewModel = new MainViewModel(this);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerDocument.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface XFormsManagerDocument extends XFormsManagerContainer { public abstract void setComponentsContainer(FormComponent component, Element element); public abstract Element getAutofillAction(FormComponent component); public abstract Element getFormDataModelElement(FormComponent component); public abstract Element getFormMainDataInstanceElement(FormComponent component); public abstract Element getSectionsVisualizationInstanceElement( FormComponent component); public abstract boolean getIsStepsVisualizationUsed(FormComponent component);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerDocument.java import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface XFormsManagerDocument extends XFormsManagerContainer { public abstract void setComponentsContainer(FormComponent component, Element element); public abstract Element getAutofillAction(FormComponent component); public abstract Element getFormDataModelElement(FormComponent component); public abstract Element getFormMainDataInstanceElement(FormComponent component); public abstract Element getSectionsVisualizationInstanceElement( FormComponent component); public abstract boolean getIsStepsVisualizationUsed(FormComponent component);
public abstract void update(FormComponent component, ConstUpdateType what);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormComponentPage.java
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // }
import com.idega.documentmanager.business.component.ButtonArea;
package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version 1.0 * */ public interface FormComponentPage extends FormComponentContainer { public abstract void setButtonAreaComponentId(String button_area_id); public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); public abstract void pagesSiblingsChanged(); public abstract FormComponentPage getPreviousPage(); public abstract FormComponentPage getNextPage(); public abstract void announceLastPage(String last_page_id);
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java import com.idega.documentmanager.business.component.ButtonArea; package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version 1.0 * */ public interface FormComponentPage extends FormComponentContainer { public abstract void setButtonAreaComponentId(String button_area_id); public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); public abstract void pagesSiblingsChanged(); public abstract FormComponentPage getPreviousPage(); public abstract FormComponentPage getNextPage(); public abstract void announceLastPage(String last_page_id);
public abstract ButtonArea getButtonArea();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerContainer.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // }
import java.util.List; import com.idega.documentmanager.component.FormComponent;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2007/10/06 07:05:40 $ by $Author: civilis $ */ public interface XFormsManagerContainer extends XFormsManager { public abstract List<String[]> getContainedComponentsTagNamesAndIds(
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerContainer.java import java.util.List; import com.idega.documentmanager.component.FormComponent; package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2007/10/06 07:05:40 $ by $Author: civilis $ */ public interface XFormsManagerContainer extends XFormsManager { public abstract List<String[]> getContainedComponentsTagNamesAndIds(
FormComponent component);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/business/PersistenceManager.java
// Path: src/java/com/idega/documentmanager/component/FormDocument.java // public interface FormDocument extends FormComponentContainer { // // public abstract void setFormDocumentModified(boolean changed); // // public abstract boolean isFormDocumentModified(); // // public abstract Document getComponentsXml(FormComponent component, Locale locale); // // public abstract Long getFormId(); // // public abstract Locale getDefaultLocale(); // // public abstract Page getConfirmationPage(); // // public abstract PageThankYou getThxPage(); // // public abstract void registerForLastPage(String register_page_id); // // public abstract String generateNewComponentId(); // // public abstract Element getAutofillModelElement(); // // public abstract Element getFormDataModelElement(); // // public abstract Element getFormMainDataInstanceElement(); // // public abstract Element getSubmissionElement(); // // public abstract Element getSectionsVisualizationInstanceElement(); // // public abstract PropertiesDocument getProperties(); // // public abstract String getFormType(); // // public abstract LocalizedStringBean getFormTitle(); // }
import java.io.IOException; import java.io.InputStream; import java.util.List; import com.idega.documentmanager.component.FormDocument;
package com.idega.documentmanager.business; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.11 $ * * Last modified: $Date: 2008/10/29 12:31:20 $ by $Author: civilis $ */ public interface PersistenceManager { public abstract PersistedFormDocument loadForm(Long formId); public abstract PersistedFormDocument loadPopulatedForm(Long submissionId);
// Path: src/java/com/idega/documentmanager/component/FormDocument.java // public interface FormDocument extends FormComponentContainer { // // public abstract void setFormDocumentModified(boolean changed); // // public abstract boolean isFormDocumentModified(); // // public abstract Document getComponentsXml(FormComponent component, Locale locale); // // public abstract Long getFormId(); // // public abstract Locale getDefaultLocale(); // // public abstract Page getConfirmationPage(); // // public abstract PageThankYou getThxPage(); // // public abstract void registerForLastPage(String register_page_id); // // public abstract String generateNewComponentId(); // // public abstract Element getAutofillModelElement(); // // public abstract Element getFormDataModelElement(); // // public abstract Element getFormMainDataInstanceElement(); // // public abstract Element getSubmissionElement(); // // public abstract Element getSectionsVisualizationInstanceElement(); // // public abstract PropertiesDocument getProperties(); // // public abstract String getFormType(); // // public abstract LocalizedStringBean getFormTitle(); // } // Path: src/java/com/idega/documentmanager/business/PersistenceManager.java import java.io.IOException; import java.io.InputStream; import java.util.List; import com.idega.documentmanager.component.FormDocument; package com.idega.documentmanager.business; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.11 $ * * Last modified: $Date: 2008/10/29 12:31:20 $ by $Author: civilis $ */ public interface PersistenceManager { public abstract PersistedFormDocument loadForm(Long formId); public abstract PersistedFormDocument loadPopulatedForm(Long submissionId);
public abstract PersistedFormDocument saveForm(FormDocument document)
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // }
import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements ButtonArea, FormComponentButtonArea { protected Map<String, String> buttons_type_id_mapping;
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements ButtonArea, FormComponentButtonArea { protected Map<String, String> buttons_type_id_mapping;
public Button getButton(ConstButtonType buttonType) {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // }
import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements ButtonArea, FormComponentButtonArea { protected Map<String, String> buttons_type_id_mapping;
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements ButtonArea, FormComponentButtonArea { protected Map<String, String> buttons_type_id_mapping;
public Button getButton(ConstButtonType buttonType) {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // }
import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements ButtonArea, FormComponentButtonArea { protected Map<String, String> buttons_type_id_mapping; public Button getButton(ConstButtonType buttonType) { if(buttonType == null) throw new NullPointerException("Button type provided null"); return !getButtonsTypeIdMapping().containsKey(buttonType) ? null : (Button)getContainedComponent(getButtonsTypeIdMapping().get(buttonType)); } public Button addButton(ConstButtonType buttonType, String componentAfterThisId) throws NullPointerException { if(buttonType == null) throw new NullPointerException("Button type provided null"); if(getButtonsTypeIdMapping().containsKey(buttonType)) throw new IllegalArgumentException("Button by type provided: "+buttonType+" already exists in the button area, remove first"); return (Button)addComponent(buttonType.toString(), componentAfterThisId); } protected Map<String, String> getButtonsTypeIdMapping() { if(buttons_type_id_mapping == null) buttons_type_id_mapping = new HashMap<String, String>(); return buttons_type_id_mapping; } @Override public void render() { super.render();
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements ButtonArea, FormComponentButtonArea { protected Map<String, String> buttons_type_id_mapping; public Button getButton(ConstButtonType buttonType) { if(buttonType == null) throw new NullPointerException("Button type provided null"); return !getButtonsTypeIdMapping().containsKey(buttonType) ? null : (Button)getContainedComponent(getButtonsTypeIdMapping().get(buttonType)); } public Button addButton(ConstButtonType buttonType, String componentAfterThisId) throws NullPointerException { if(buttonType == null) throw new NullPointerException("Button type provided null"); if(getButtonsTypeIdMapping().containsKey(buttonType)) throw new IllegalArgumentException("Button by type provided: "+buttonType+" already exists in the button area, remove first"); return (Button)addComponent(buttonType.toString(), componentAfterThisId); } protected Map<String, String> getButtonsTypeIdMapping() { if(buttons_type_id_mapping == null) buttons_type_id_mapping = new HashMap<String, String>(); return buttons_type_id_mapping; } @Override public void render() { super.render();
((FormComponentPage)parent).setButtonAreaComponentId(getId());
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // }
import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage;
if(getButtonsTypeIdMapping().containsKey(buttonType)) throw new IllegalArgumentException("Button by type provided: "+buttonType+" already exists in the button area, remove first"); return (Button)addComponent(buttonType.toString(), componentAfterThisId); } protected Map<String, String> getButtonsTypeIdMapping() { if(buttons_type_id_mapping == null) buttons_type_id_mapping = new HashMap<String, String>(); return buttons_type_id_mapping; } @Override public void render() { super.render(); ((FormComponentPage)parent).setButtonAreaComponentId(getId()); } @Override public void remove() { super.remove(); ((FormComponentPage)parent).setButtonAreaComponentId(null); } public void setButtonMapping(String button_type, String button_id) { getButtonsTypeIdMapping().put(button_type, button_id); } public void setPageSiblings(FormComponentPage previous, FormComponentPage next) {
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/ConstButtonType.java // public enum ConstButtonType { // // PREVIOUS_PAGE_BUTTON {public String toString() { return "fbc_button_previous"; }}, // NEXT_PAGE_BUTTON {public String toString() { return "fbc_button_next"; }}, // SUBMIT_FORM_BUTTON {public String toString() { return "fbc_button_submit"; }}, // SAVE_FORM_BUTTON {public String toString() { return "fbc_button_save"; }}, // RESET_FORM_BUTTON {public String toString() { return "fbc_button_reset"; }}; // // public static Set<String> getAllTypesInStrings() { // // return getAllStringTypesEnumsMappings().keySet(); // } // // private static Map<String, ConstButtonType> allStringTypesEnumsMappings; // // private synchronized static Map<String, ConstButtonType> getAllStringTypesEnumsMappings() { // // if(allStringTypesEnumsMappings == null) { // // allStringTypesEnumsMappings = new HashMap<String, ConstButtonType>(); // // for (ConstButtonType type : values()) // allStringTypesEnumsMappings.put(type.toString(), type); // } // // return allStringTypesEnumsMappings; // } // // public static ConstButtonType getByStringType(String type) { // // return getAllStringTypesEnumsMappings().get(type); // } // // public abstract String toString(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; if(getButtonsTypeIdMapping().containsKey(buttonType)) throw new IllegalArgumentException("Button by type provided: "+buttonType+" already exists in the button area, remove first"); return (Button)addComponent(buttonType.toString(), componentAfterThisId); } protected Map<String, String> getButtonsTypeIdMapping() { if(buttons_type_id_mapping == null) buttons_type_id_mapping = new HashMap<String, String>(); return buttons_type_id_mapping; } @Override public void render() { super.render(); ((FormComponentPage)parent).setButtonAreaComponentId(getId()); } @Override public void remove() { super.remove(); ((FormComponentPage)parent).setButtonAreaComponentId(null); } public void setButtonMapping(String button_type, String button_id) { getButtonsTypeIdMapping().put(button_type, button_id); } public void setPageSiblings(FormComponentPage previous, FormComponentPage next) {
FormComponentButton button = (FormComponentButton)getButton(ConstButtonType.PREVIOUS_PAGE_BUTTON);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentThankYouPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesThankYouPage.java // public interface PropertiesThankYouPage extends PropertiesPage { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesThankYouPage.java // public class ComponentPropertiesThankYouPage extends ComponentPropertiesPage implements PropertiesThankYouPage { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.THANKYOU_TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java // public interface XFormsManagerThankYouPage extends XFormsManagerPage { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getThankYouText(FormComponent component); // }
import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesThankYouPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesThankYouPage; import com.idega.documentmanager.manager.XFormsManagerThankYouPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentThankYouPageImpl extends FormComponentPageImpl implements PageThankYou { @Override
// Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesThankYouPage.java // public interface PropertiesThankYouPage extends PropertiesPage { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesThankYouPage.java // public class ComponentPropertiesThankYouPage extends ComponentPropertiesPage implements PropertiesThankYouPage { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.THANKYOU_TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java // public interface XFormsManagerThankYouPage extends XFormsManagerPage { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getThankYouText(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentThankYouPageImpl.java import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesThankYouPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesThankYouPage; import com.idega.documentmanager.manager.XFormsManagerThankYouPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentThankYouPageImpl extends FormComponentPageImpl implements PageThankYou { @Override
public PropertiesThankYouPage getProperties() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentThankYouPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesThankYouPage.java // public interface PropertiesThankYouPage extends PropertiesPage { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesThankYouPage.java // public class ComponentPropertiesThankYouPage extends ComponentPropertiesPage implements PropertiesThankYouPage { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.THANKYOU_TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java // public interface XFormsManagerThankYouPage extends XFormsManagerPage { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getThankYouText(FormComponent component); // }
import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesThankYouPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesThankYouPage; import com.idega.documentmanager.manager.XFormsManagerThankYouPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentThankYouPageImpl extends FormComponentPageImpl implements PageThankYou { @Override public PropertiesThankYouPage getProperties() { if(properties == null) {
// Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesThankYouPage.java // public interface PropertiesThankYouPage extends PropertiesPage { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesThankYouPage.java // public class ComponentPropertiesThankYouPage extends ComponentPropertiesPage implements PropertiesThankYouPage { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.THANKYOU_TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java // public interface XFormsManagerThankYouPage extends XFormsManagerPage { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getThankYouText(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentThankYouPageImpl.java import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesThankYouPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesThankYouPage; import com.idega.documentmanager.manager.XFormsManagerThankYouPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentThankYouPageImpl extends FormComponentPageImpl implements PageThankYou { @Override public PropertiesThankYouPage getProperties() { if(properties == null) {
ComponentPropertiesThankYouPage properties = new ComponentPropertiesThankYouPage();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentThankYouPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesThankYouPage.java // public interface PropertiesThankYouPage extends PropertiesPage { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesThankYouPage.java // public class ComponentPropertiesThankYouPage extends ComponentPropertiesPage implements PropertiesThankYouPage { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.THANKYOU_TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java // public interface XFormsManagerThankYouPage extends XFormsManagerPage { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getThankYouText(FormComponent component); // }
import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesThankYouPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesThankYouPage; import com.idega.documentmanager.manager.XFormsManagerThankYouPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentThankYouPageImpl extends FormComponentPageImpl implements PageThankYou { @Override public PropertiesThankYouPage getProperties() { if(properties == null) { ComponentPropertiesThankYouPage properties = new ComponentPropertiesThankYouPage(); properties.setComponent(this); this.properties = properties; } return (PropertiesThankYouPage)properties; } @Override
// Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesThankYouPage.java // public interface PropertiesThankYouPage extends PropertiesPage { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesThankYouPage.java // public class ComponentPropertiesThankYouPage extends ComponentPropertiesPage implements PropertiesThankYouPage { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.THANKYOU_TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java // public interface XFormsManagerThankYouPage extends XFormsManagerPage { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getThankYouText(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentThankYouPageImpl.java import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesThankYouPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesThankYouPage; import com.idega.documentmanager.manager.XFormsManagerThankYouPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentThankYouPageImpl extends FormComponentPageImpl implements PageThankYou { @Override public PropertiesThankYouPage getProperties() { if(properties == null) { ComponentPropertiesThankYouPage properties = new ComponentPropertiesThankYouPage(); properties.setComponent(this); this.properties = properties; } return (PropertiesThankYouPage)properties; } @Override
public XFormsManagerThankYouPage getXFormsManager() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManager.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import org.w3c.dom.Element; import com.idega.block.process.variables.Variable; import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.15 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface XFormsManager { public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String component_type) throws NullPointerException; public abstract void loadXFormsComponentFromDocument(FormComponent component); public abstract void addComponentToDocument(FormComponent component);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManager.java import org.w3c.dom.Element; import com.idega.block.process.variables.Variable; import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.15 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface XFormsManager { public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String component_type) throws NullPointerException; public abstract void loadXFormsComponentFromDocument(FormComponent component); public abstract void addComponentToDocument(FormComponent component);
public abstract void update(FormComponent component, ConstUpdateType what);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManager.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import org.w3c.dom.Element; import com.idega.block.process.variables.Variable; import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.15 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface XFormsManager { public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String component_type) throws NullPointerException; public abstract void loadXFormsComponentFromDocument(FormComponent component); public abstract void addComponentToDocument(FormComponent component); public abstract void update(FormComponent component, ConstUpdateType what); public abstract void moveComponent(FormComponent component, String before_component_id); public abstract void removeComponentFromXFormsDocument(FormComponent component); public abstract String insertBindElement(FormComponent component, Element new_bind_element, String bind_id); public abstract void changeBindName(FormComponent component, String new_bind_name);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManager.java import org.w3c.dom.Element; import com.idega.block.process.variables.Variable; import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.15 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface XFormsManager { public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String component_type) throws NullPointerException; public abstract void loadXFormsComponentFromDocument(FormComponent component); public abstract void addComponentToDocument(FormComponent component); public abstract void update(FormComponent component, ConstUpdateType what); public abstract void moveComponent(FormComponent component, String before_component_id); public abstract void removeComponentFromXFormsDocument(FormComponent component); public abstract String insertBindElement(FormComponent component, Element new_bind_element, String bind_id); public abstract void changeBindName(FormComponent component, String new_bind_name);
public abstract LocalizedStringBean getLocalizedStrings(FormComponent component);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/util/FormManagerUtil.java
// Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/datatypes/ComponentType.java // public class ComponentType { // // private String type; // private List<String> datatypes = new ArrayList<String>(); // private String accessSupport; // // public ComponentType() { // // } // // public ComponentType(String id, String accessSupport) { // this.type = id; // this.accessSupport = accessSupport; // } // // public String getType() { // return type; // } // public void setType(String type) { // this.type = type; // } // public List<String> getDatatypes() { // return datatypes; // } // public void setDatatypes(List<String> datatypes) { // this.datatypes = datatypes; // } // public String getAccessSupport() { // return accessSupport; // } // public void setAccessSupport(String accessSupport) { // this.accessSupport = accessSupport; // } // // }
import java.io.File; import java.io.IOException; import java.io.StringWriter; import java.text.CharacterIterator; import java.text.StringCharacterIterator; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.chiba.xml.dom.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.idega.chiba.web.xml.xforms.util.XFormsUtil; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.datatypes.ComponentType; import com.idega.util.CoreConstants; import com.idega.util.LocaleUtil; import com.idega.util.xml.Prefix; import com.idega.util.xml.XPathUtil; import com.idega.util.xml.XmlUtil;
Element start_element; if(start_tag != null) start_element = (Element)doc.getElementsByTagName(start_tag).item(0); else start_element = doc.getDocumentElement(); return DOMUtil.getElementByAttributeValue(start_element, CoreConstants.STAR, attribute_name, attribute_value); } public static void insertNodesetElement(Document form_xforms, Element new_nodeset_element) { Element container = (Element)((Element)form_xforms .getElementsByTagName(instance_tag).item(0)) .getElementsByTagName("data").item(0); container.appendChild(new_nodeset_element); } /** * Puts localized text on element. Localization is saved on the xforms document. * * @param key - new localization message key * @param oldKey - old key, if provided, is used for replacing with new_key * @param element - element, to change or put localization message * @param xform - xforms document * @param localizedStr - localized message * @throws NullPointerException - something necessary not provided */
// Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/datatypes/ComponentType.java // public class ComponentType { // // private String type; // private List<String> datatypes = new ArrayList<String>(); // private String accessSupport; // // public ComponentType() { // // } // // public ComponentType(String id, String accessSupport) { // this.type = id; // this.accessSupport = accessSupport; // } // // public String getType() { // return type; // } // public void setType(String type) { // this.type = type; // } // public List<String> getDatatypes() { // return datatypes; // } // public void setDatatypes(List<String> datatypes) { // this.datatypes = datatypes; // } // public String getAccessSupport() { // return accessSupport; // } // public void setAccessSupport(String accessSupport) { // this.accessSupport = accessSupport; // } // // } // Path: src/java/com/idega/documentmanager/util/FormManagerUtil.java import java.io.File; import java.io.IOException; import java.io.StringWriter; import java.text.CharacterIterator; import java.text.StringCharacterIterator; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.chiba.xml.dom.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.idega.chiba.web.xml.xforms.util.XFormsUtil; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.datatypes.ComponentType; import com.idega.util.CoreConstants; import com.idega.util.LocaleUtil; import com.idega.util.xml.Prefix; import com.idega.util.xml.XPathUtil; import com.idega.util.xml.XmlUtil; Element start_element; if(start_tag != null) start_element = (Element)doc.getElementsByTagName(start_tag).item(0); else start_element = doc.getDocumentElement(); return DOMUtil.getElementByAttributeValue(start_element, CoreConstants.STAR, attribute_name, attribute_value); } public static void insertNodesetElement(Document form_xforms, Element new_nodeset_element) { Element container = (Element)((Element)form_xforms .getElementsByTagName(instance_tag).item(0)) .getElementsByTagName("data").item(0); container.appendChild(new_nodeset_element); } /** * Puts localized text on element. Localization is saved on the xforms document. * * @param key - new localization message key * @param oldKey - old key, if provided, is used for replacing with new_key * @param element - element, to change or put localization message * @param xform - xforms document * @param localizedStr - localized message * @throws NullPointerException - something necessary not provided */
public static void putLocalizedText(String key, String oldKey, Element element, Document xform, LocalizedStringBean localizedStr) throws NullPointerException {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/util/FormManagerUtil.java
// Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/datatypes/ComponentType.java // public class ComponentType { // // private String type; // private List<String> datatypes = new ArrayList<String>(); // private String accessSupport; // // public ComponentType() { // // } // // public ComponentType(String id, String accessSupport) { // this.type = id; // this.accessSupport = accessSupport; // } // // public String getType() { // return type; // } // public void setType(String type) { // this.type = type; // } // public List<String> getDatatypes() { // return datatypes; // } // public void setDatatypes(List<String> datatypes) { // this.datatypes = datatypes; // } // public String getAccessSupport() { // return accessSupport; // } // public void setAccessSupport(String accessSupport) { // this.accessSupport = accessSupport; // } // // }
import java.io.File; import java.io.IOException; import java.io.StringWriter; import java.text.CharacterIterator; import java.text.StringCharacterIterator; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.chiba.xml.dom.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.idega.chiba.web.xml.xforms.util.XFormsUtil; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.datatypes.ComponentType; import com.idega.util.CoreConstants; import com.idega.util.LocaleUtil; import com.idega.util.xml.Prefix; import com.idega.util.xml.XPathUtil; import com.idega.util.xml.XmlUtil;
if(appendToContext) { el = (Element)context.appendChild(el); } return el; } public static NodeList getElementsContainingAttribute(Node context, String elementName, String attributeName) { if(isEmpty(elementName)) elementName = CoreConstants.STAR; if(isEmpty(attributeName)) attributeName = CoreConstants.STAR; synchronized (elementsContainingAttributeXPath) { elementsContainingAttributeXPath.clearVariables(); elementsContainingAttributeXPath.setVariable(elementNameVariable, elementName); elementsContainingAttributeXPath.setVariable(attributeNameVariable, attributeName); return elementsContainingAttributeXPath.getNodeset(context); } } private static Element getDataModelSetValueElement(Node context) { return localizaionSetValueElement.getNode(context); }
// Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/datatypes/ComponentType.java // public class ComponentType { // // private String type; // private List<String> datatypes = new ArrayList<String>(); // private String accessSupport; // // public ComponentType() { // // } // // public ComponentType(String id, String accessSupport) { // this.type = id; // this.accessSupport = accessSupport; // } // // public String getType() { // return type; // } // public void setType(String type) { // this.type = type; // } // public List<String> getDatatypes() { // return datatypes; // } // public void setDatatypes(List<String> datatypes) { // this.datatypes = datatypes; // } // public String getAccessSupport() { // return accessSupport; // } // public void setAccessSupport(String accessSupport) { // this.accessSupport = accessSupport; // } // // } // Path: src/java/com/idega/documentmanager/util/FormManagerUtil.java import java.io.File; import java.io.IOException; import java.io.StringWriter; import java.text.CharacterIterator; import java.text.StringCharacterIterator; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.chiba.xml.dom.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.idega.chiba.web.xml.xforms.util.XFormsUtil; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.datatypes.ComponentType; import com.idega.util.CoreConstants; import com.idega.util.LocaleUtil; import com.idega.util.xml.Prefix; import com.idega.util.xml.XPathUtil; import com.idega.util.xml.XmlUtil; if(appendToContext) { el = (Element)context.appendChild(el); } return el; } public static NodeList getElementsContainingAttribute(Node context, String elementName, String attributeName) { if(isEmpty(elementName)) elementName = CoreConstants.STAR; if(isEmpty(attributeName)) attributeName = CoreConstants.STAR; synchronized (elementsContainingAttributeXPath) { elementsContainingAttributeXPath.clearVariables(); elementsContainingAttributeXPath.setVariable(elementNameVariable, elementName); elementsContainingAttributeXPath.setVariable(attributeNameVariable, attributeName); return elementsContainingAttributeXPath.getNodeset(context); } } private static Element getDataModelSetValueElement(Node context) { return localizaionSetValueElement.getNode(context); }
public static Map<String, List<ComponentType>> getComponentsTypesByDatatype(Document form_components_doc) {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() {
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() {
ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() { ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties(); if(properties == null) return; properties.setText(getXFormsManager().getText(this)); } @Override
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() { ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties(); if(properties == null) return; properties.setText(getXFormsManager().getText(this)); } @Override
public PropertiesPlain getProperties() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() { ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties(); if(properties == null) return; properties.setText(getXFormsManager().getText(this)); } @Override public PropertiesPlain getProperties() { if(properties == null) { ComponentPropertiesPlain properties = new ComponentPropertiesPlain(); properties.setComponent(this); this.properties = properties; } return (PropertiesPlain)properties; } @Override
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() { ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties(); if(properties == null) return; properties.setText(getXFormsManager().getText(this)); } @Override public PropertiesPlain getProperties() { if(properties == null) { ComponentPropertiesPlain properties = new ComponentPropertiesPlain(); properties.setComponent(this); this.properties = properties; } return (PropertiesPlain)properties; } @Override
public XFormsManagerPlain getXFormsManager() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() { ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties(); if(properties == null) return; properties.setText(getXFormsManager().getText(this)); } @Override public PropertiesPlain getProperties() { if(properties == null) { ComponentPropertiesPlain properties = new ComponentPropertiesPlain(); properties.setComponent(this); this.properties = properties; } return (PropertiesPlain)properties; } @Override public XFormsManagerPlain getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerPlain(); } @Override
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java // public interface ComponentPlain extends Component { // // public abstract PropertiesPlain getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java // public interface PropertiesPlain extends PropertiesComponent { // // public abstract LocalizedStringBean getText(); // // public abstract void setText(LocalizedStringBean text); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java // public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain { // // private LocalizedStringBean text; // // public LocalizedStringBean getText() { // return text; // } // // public void setText(LocalizedStringBean text) { // this.text = text; // component.update(ConstUpdateType.TEXT); // } // // public void setPlainText(LocalizedStringBean text) { // this.text = text; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java // public interface XFormsManagerPlain extends XFormsManager { // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract LocalizedStringBean getText(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerPlain; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @Override protected void setProperties() { ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties(); if(properties == null) return; properties.setText(getXFormsManager().getText(this)); } @Override public PropertiesPlain getProperties() { if(properties == null) { ComponentPropertiesPlain properties = new ComponentPropertiesPlain(); properties.setComponent(this); this.properties = properties; } return (PropertiesPlain)properties; } @Override public XFormsManagerPlain getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerPlain(); } @Override
public void update(ConstUpdateType what) {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2007/10/06 07:05:40 $ by $Author: civilis $ */ public interface XFormsManagerThankYouPage extends XFormsManagerPage { public abstract void update(FormComponent component, ConstUpdateType what);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerThankYouPage.java import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2007/10/06 07:05:40 $ by $Author: civilis $ */ public interface XFormsManagerThankYouPage extends XFormsManagerPage { public abstract void update(FormComponent component, ConstUpdateType what);
public abstract LocalizedStringBean getThankYouText(FormComponent component);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.3 $ * * Last modified: $Date: 2007/11/15 09:24:15 $ by $Author: civilis $ */ public interface XFormsManagerPlain extends XFormsManager { public abstract void update(FormComponent component, ConstUpdateType what);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.3 $ * * Last modified: $Date: 2007/11/15 09:24:15 $ by $Author: civilis $ */ public interface XFormsManagerPlain extends XFormsManager { public abstract void update(FormComponent component, ConstUpdateType what);
public abstract LocalizedStringBean getText(FormComponent component);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormComponentContainer.java
// Path: src/java/com/idega/documentmanager/business/component/Component.java // public interface Component { // // public abstract String getId(); // // public abstract Element getHtmlRepresentation(Locale locale) throws Exception; // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract String getType(); // // // public Element getDefaultHtmlRepresentationByType(String component_type); // }
import java.util.List; import com.idega.documentmanager.business.component.Component;
package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface FormComponentContainer extends FormComponent { public abstract FormComponent getContainedComponent(String component_id);
// Path: src/java/com/idega/documentmanager/business/component/Component.java // public interface Component { // // public abstract String getId(); // // public abstract Element getHtmlRepresentation(Locale locale) throws Exception; // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract String getType(); // // // public Element getDefaultHtmlRepresentationByType(String component_type); // } // Path: src/java/com/idega/documentmanager/component/FormComponentContainer.java import java.util.List; import com.idega.documentmanager.business.component.Component; package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:11 $ by $Author: anton $ */ public interface FormComponentContainer extends FormComponent { public abstract FormComponent getContainedComponent(String component_id);
public abstract Component addComponent(String component_type, String component_after_this_id) throws NullPointerException;
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormComponentParent.java
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // }
import java.util.Locale; import org.w3c.dom.Document; import com.idega.documentmanager.business.component.Page;
package com.idega.documentmanager.component; /** * * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version 1.0 * */ public interface FormComponentParent { public abstract Document getXformsDocument();
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // Path: src/java/com/idega/documentmanager/component/FormComponentParent.java import java.util.Locale; import org.w3c.dom.Document; import com.idega.documentmanager.business.component.Page; package com.idega.documentmanager.component; /** * * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version 1.0 * */ public interface FormComponentParent { public abstract Document getXformsDocument();
public abstract Page getPage(String component_id);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesDocument.java
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // }
import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean;
setPlainSubmissionAction(submissionAction); component.update(ConstUpdateType.SUBMISSION_ACTION); } public boolean isStepsVisualizationUsed() { return stepsVisualizationUsed; } public void setPlainSubmissionAction(String submissionAction) { if(submissionAction == null || submissionAction.equals("")) throw new NullPointerException("Submission action was empty: "+submissionAction); this.submissionAction = submissionAction; } public void setStepsVisualizationUsed(boolean steps_visualization_used) { if(true) return; this.stepsVisualizationUsed = steps_visualization_used; component.update(ConstUpdateType.STEPS_VISUALIZATION_USED); } public void setPlainStepsVisualizationUsed(boolean steps_visualization_used) { this.stepsVisualizationUsed = steps_visualization_used; } // methods not used --------- public String getAutofillKey() { throw new RuntimeException("Wrong method call"); }
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesDocument.java import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean; setPlainSubmissionAction(submissionAction); component.update(ConstUpdateType.SUBMISSION_ACTION); } public boolean isStepsVisualizationUsed() { return stepsVisualizationUsed; } public void setPlainSubmissionAction(String submissionAction) { if(submissionAction == null || submissionAction.equals("")) throw new NullPointerException("Submission action was empty: "+submissionAction); this.submissionAction = submissionAction; } public void setStepsVisualizationUsed(boolean steps_visualization_used) { if(true) return; this.stepsVisualizationUsed = steps_visualization_used; component.update(ConstUpdateType.STEPS_VISUALIZATION_USED); } public void setPlainStepsVisualizationUsed(boolean steps_visualization_used) { this.stepsVisualizationUsed = steps_visualization_used; } // methods not used --------- public String getAutofillKey() { throw new RuntimeException("Wrong method call"); }
public LocalizedStringBean getErrorMsg() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerMultiUploadDescription.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUploadDescription extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerMultiUploadDescription.java import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUploadDescription extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component);
public abstract LocalizedStringBean getRemoveButtonLabel(FormComponent component);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerMultiUploadDescription.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUploadDescription extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component); public abstract LocalizedStringBean getRemoveButtonLabel(FormComponent component); public abstract LocalizedStringBean getAddButtonLabel(FormComponent component); public abstract LocalizedStringBean getDescriptionButtonLabel(FormComponent component); public abstract LocalizedStringBean getUploadingFileDescription(FormComponent component);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerMultiUploadDescription.java import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.2 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUploadDescription extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component); public abstract LocalizedStringBean getRemoveButtonLabel(FormComponent component); public abstract LocalizedStringBean getAddButtonLabel(FormComponent component); public abstract LocalizedStringBean getDescriptionButtonLabel(FormComponent component); public abstract LocalizedStringBean getUploadingFileDescription(FormComponent component);
public abstract void update(FormComponent component, ConstUpdateType what);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override
public XFormsManagerSelect getXFormsManager() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override public XFormsManagerSelect getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerSelect(); } @Override
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override public XFormsManagerSelect getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerSelect(); } @Override
public PropertiesSelect getProperties() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override public XFormsManagerSelect getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerSelect(); } @Override public PropertiesSelect getProperties() { if(properties == null) {
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override public XFormsManagerSelect getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerSelect(); } @Override public PropertiesSelect getProperties() { if(properties == null) {
ComponentPropertiesSelect properties = new ComponentPropertiesSelect();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // }
import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override public XFormsManagerSelect getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerSelect(); } @Override public PropertiesSelect getProperties() { if(properties == null) { ComponentPropertiesSelect properties = new ComponentPropertiesSelect(); properties.setComponent(this); this.properties = properties; } return (PropertiesSelect)properties; } @Override protected void setProperties() { super.setProperties(); ComponentPropertiesSelect properties = (ComponentPropertiesSelect)getProperties(); XFormsManagerSelect xforms_manager = getXFormsManager(); properties.setDataSrcUsedPlain(xforms_manager.getDataSrcUsed(this)); properties.setExternalDataSrcPlain(xforms_manager.getExternalDataSrc(this)); properties.setItemsetPlain(xforms_manager.getItemset(this)); } @Override
// Path: src/java/com/idega/documentmanager/business/component/ComponentSelect.java // public interface ComponentSelect extends Component { // // public abstract PropertiesSelect getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesSelect.java // public interface PropertiesSelect extends PropertiesComponent { // // public static final int LOCAL_DATA_SRC = 1; // public static final int EXTERNAL_DATA_SRC = 2; // // public abstract LocalizedItemsetBean getItemset(); // // public abstract String getExternalDataSrc(); // // public abstract void setExternalDataSrc(String external_data_src); // // public abstract Integer getDataSrcUsed(); // // public abstract void setDataSrcUsed(Integer data_src_used); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesSelect.java // public class ComponentPropertiesSelect extends ComponentProperties implements PropertiesSelect { // // private String external_data_src; // private LocalizedItemsetBean itemset; // private Integer data_src_used; // // public LocalizedItemsetBean getItemset() { // return itemset; // } // public void setItemsetPlain(LocalizedItemsetBean itemset) { // this.itemset = itemset; // } // public String getExternalDataSrc() { // return external_data_src; // } // /** // * @param external_data_src - source to xml, containing data source<br /> // * <b>IMPORTANT:</b> xml data structure should validate against // * select-data-src.xsd (look somewhere around for it, probably in resources/templates). // * See also select-data-src.xml for example. // * // */ // public void setExternalDataSrc(String external_data_src) { // this.external_data_src = external_data_src; // component.update(ConstUpdateType.EXTERNAL_DATA_SRC); // } // public void setExternalDataSrcPlain(String external_data_src) { // this.external_data_src = external_data_src; // } // public Integer getDataSrcUsed() { // return data_src_used; // } // public void setDataSrcUsed(Integer data_src_used) { // // if(data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // component.update(ConstUpdateType.DATA_SRC_USED); // } // public void setDataSrcUsedPlain(Integer data_src_used) { // // if(data_src_used != null && data_src_used != LOCAL_DATA_SRC && data_src_used != EXTERNAL_DATA_SRC) // throw new IllegalArgumentException("Neither LOCAL_DATA_SRC, nor EXTERNAL_DATA_SRC provided."); // // this.data_src_used = data_src_used; // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerSelect.java // public interface XFormsManagerSelect extends XFormsManager { // // public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, // String componentType) throws NullPointerException; // // public abstract void addComponentToDocument(FormComponent component); // // public abstract Integer getDataSrcUsed(FormComponent component); // // public abstract String getExternalDataSrc(FormComponent component); // // public abstract LocalizedItemsetBean getItemset(FormComponent component); // // public abstract void update(FormComponent component, ConstUpdateType what); // // public abstract void removeSelectComponentSourcesFromXFormsDocument( // FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentSelectImpl.java import com.idega.documentmanager.business.component.ComponentSelect; import com.idega.documentmanager.business.component.properties.PropertiesSelect; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesSelect; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com.idega.documentmanager.manager.XFormsManagerSelect; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.6 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentSelectImpl extends FormComponentImpl implements ComponentSelect { @Override public XFormsManagerSelect getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerSelect(); } @Override public PropertiesSelect getProperties() { if(properties == null) { ComponentPropertiesSelect properties = new ComponentPropertiesSelect(); properties.setComponent(this); this.properties = properties; } return (PropertiesSelect)properties; } @Override protected void setProperties() { super.setProperties(); ComponentPropertiesSelect properties = (ComponentPropertiesSelect)getProperties(); XFormsManagerSelect xforms_manager = getXFormsManager(); properties.setDataSrcUsedPlain(xforms_manager.getDataSrcUsed(this)); properties.setExternalDataSrcPlain(xforms_manager.getExternalDataSrc(this)); properties.setItemsetPlain(xforms_manager.getItemset(this)); } @Override
public void update(ConstUpdateType what) {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // }
import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override
public XFormsManagerButton getXFormsManager() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // }
import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render();
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render();
FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent;
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // }
import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render(); FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent; if(!load) setSiblingsAndParentPages(buttonArea.getPreviousPage(), buttonArea.getNextPage()); ((FormComponentButtonArea)parent).setButtonMapping(getType(), getId()); }
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render(); FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent; if(!load) setSiblingsAndParentPages(buttonArea.getPreviousPage(), buttonArea.getNextPage()); ((FormComponentButtonArea)parent).setButtonMapping(getType(), getId()); }
public void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next) {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // }
import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render(); FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent; if(!load) setSiblingsAndParentPages(buttonArea.getPreviousPage(), buttonArea.getNextPage()); ((FormComponentButtonArea)parent).setButtonMapping(getType(), getId()); } public void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next) { getXFormsManager().renewButtonPageContextPages(this, previous, next); } public void setLastPageId(String pageId) { getXFormsManager().setLastPageToSubmitButton(this, pageId); } @Override
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render(); FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent; if(!load) setSiblingsAndParentPages(buttonArea.getPreviousPage(), buttonArea.getNextPage()); ((FormComponentButtonArea)parent).setButtonMapping(getType(), getId()); } public void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next) { getXFormsManager().renewButtonPageContextPages(this, previous, next); } public void setLastPageId(String pageId) { getXFormsManager().setLastPageToSubmitButton(this, pageId); } @Override
public PropertiesButton getProperties() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // }
import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render(); FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent; if(!load) setSiblingsAndParentPages(buttonArea.getPreviousPage(), buttonArea.getNextPage()); ((FormComponentButtonArea)parent).setButtonMapping(getType(), getId()); } public void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next) { getXFormsManager().renewButtonPageContextPages(this, previous, next); } public void setLastPageId(String pageId) { getXFormsManager().setLastPageToSubmitButton(this, pageId); } @Override public PropertiesButton getProperties() { if(properties == null) {
// Path: src/java/com/idega/documentmanager/business/component/Button.java // public interface Button extends Component { // // public abstract PropertiesButton getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesButton.java // public interface PropertiesButton extends PropertiesComponent { // // public abstract String getReferAction(); // // public abstract void setReferAction(String referAction); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButton.java // public interface FormComponentButton extends FormComponent { // // public abstract void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageId(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesButton.java // public class ComponentPropertiesButton extends ComponentProperties implements PropertiesButton { // // private String referAction; // // public String getReferAction() { // return referAction; // } // public void setReferAction(String referAction) { // setReferActionPlain(referAction); // component.update(ConstUpdateType.BUTTON_REFER_TO_ACTION); // } // public void setReferActionPlain(String referAction) { // this.referAction = CoreConstants.EMPTY.equals(referAction) ? null : referAction; // } // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerButton.java // public interface XFormsManagerButton extends XFormsManager { // // public abstract void renewButtonPageContextPages(FormComponent component, FormComponentPage previous, FormComponentPage next); // // public abstract void setLastPageToSubmitButton(FormComponent component, String last_page_id); // // public abstract String getReferAction(FormComponent component); // // public abstract boolean isSubmitButton(FormComponent component); // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentButtonImpl.java import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.properties.PropertiesButton; import com.idega.documentmanager.component.FormComponentButton; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesButton; import com.idega.documentmanager.manager.XFormsManagerButton; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonImpl extends FormComponentImpl implements Button, FormComponentButton { @Override public XFormsManagerButton getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerButton(); } @Override public void render() { boolean load = this.load; super.render(); FormComponentButtonArea buttonArea = (FormComponentButtonArea)parent; if(!load) setSiblingsAndParentPages(buttonArea.getPreviousPage(), buttonArea.getNextPage()); ((FormComponentButtonArea)parent).setButtonMapping(getType(), getId()); } public void setSiblingsAndParentPages(FormComponentPage previous, FormComponentPage next) { getXFormsManager().renewButtonPageContextPages(this, previous, next); } public void setLastPageId(String pageId) { getXFormsManager().setLastPageToSubmitButton(this, pageId); } @Override public PropertiesButton getProperties() { if(properties == null) {
ComponentPropertiesButton properties = new ComponentPropertiesButton();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/business/component/Component.java
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesComponent.java // public interface PropertiesComponent { // // public abstract LocalizedStringBean getErrorMsg(ErrorType errorType); // // public abstract LocalizedStringBean getErrorMsg(); // // public abstract void setErrorMsg(ErrorType errorType, LocalizedStringBean errorMsg); // // public abstract void setErrorMsg(LocalizedStringBean errorMsg); // // public abstract LocalizedStringBean getLabel(); // // public abstract void setLabel(LocalizedStringBean label); // // public abstract boolean isRequired(); // // public abstract void setRequired(boolean required); // // public abstract String getP3ptype(); // // public abstract void setP3ptype(String p3ptype); // // public abstract String getAutofillKey(); // // public abstract void setAutofillKey(String autofill_key); // // public abstract LocalizedStringBean getHelpText(); // // public abstract void setHelpText(LocalizedStringBean help_text); // // public abstract void setValidationText(LocalizedStringBean validation_text); // // public abstract LocalizedStringBean getValidationText(); // // public abstract Variable getVariable(); // // public abstract void setVariable(Variable variable); // // public abstract void setVariable(String variableStringRepresentation); // // public abstract boolean isReadonly(); // // public abstract void setReadonly(boolean readonly); // }
import java.util.Locale; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.properties.PropertiesComponent;
package com.idega.documentmanager.business.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.3 $ * * Last modified: $Date: 2007/11/15 09:24:15 $ by $Author: civilis $ */ public interface Component { public abstract String getId(); public abstract Element getHtmlRepresentation(Locale locale) throws Exception;
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesComponent.java // public interface PropertiesComponent { // // public abstract LocalizedStringBean getErrorMsg(ErrorType errorType); // // public abstract LocalizedStringBean getErrorMsg(); // // public abstract void setErrorMsg(ErrorType errorType, LocalizedStringBean errorMsg); // // public abstract void setErrorMsg(LocalizedStringBean errorMsg); // // public abstract LocalizedStringBean getLabel(); // // public abstract void setLabel(LocalizedStringBean label); // // public abstract boolean isRequired(); // // public abstract void setRequired(boolean required); // // public abstract String getP3ptype(); // // public abstract void setP3ptype(String p3ptype); // // public abstract String getAutofillKey(); // // public abstract void setAutofillKey(String autofill_key); // // public abstract LocalizedStringBean getHelpText(); // // public abstract void setHelpText(LocalizedStringBean help_text); // // public abstract void setValidationText(LocalizedStringBean validation_text); // // public abstract LocalizedStringBean getValidationText(); // // public abstract Variable getVariable(); // // public abstract void setVariable(Variable variable); // // public abstract void setVariable(String variableStringRepresentation); // // public abstract boolean isReadonly(); // // public abstract void setReadonly(boolean readonly); // } // Path: src/java/com/idega/documentmanager/business/component/Component.java import java.util.Locale; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.properties.PropertiesComponent; package com.idega.documentmanager.business.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.3 $ * * Last modified: $Date: 2007/11/15 09:24:15 $ by $Author: civilis $ */ public interface Component { public abstract String getId(); public abstract Element getHtmlRepresentation(Locale locale) throws Exception;
public abstract PropertiesComponent getProperties();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // }
import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page;
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page;
public PropertiesPage getProperties() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // }
import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page; public PropertiesPage getProperties() { if(properties == null) {
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page; public PropertiesPage getProperties() { if(properties == null) {
ComponentPropertiesPage properties = new ComponentPropertiesPage();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // }
import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page; public PropertiesPage getProperties() { if(properties == null) { ComponentPropertiesPage properties = new ComponentPropertiesPage(); properties.setComponent(this); this.properties = properties; } return (PropertiesPage)properties; } @Override
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page; public PropertiesPage getProperties() { if(properties == null) { ComponentPropertiesPage properties = new ComponentPropertiesPage(); properties.setComponent(this); this.properties = properties; } return (PropertiesPage)properties; } @Override
public XFormsManagerPage getXFormsManager() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // }
import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage;
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page; public PropertiesPage getProperties() { if(properties == null) { ComponentPropertiesPage properties = new ComponentPropertiesPage(); properties.setComponent(this); this.properties = properties; } return (PropertiesPage)properties; } @Override public XFormsManagerPage getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerPage(); } @Override public void remove() { if(getType().equals(FormComponentFactory.page_type_thx)) { //TODO: log warning System.out.println("removing page thx"); } super.remove(); parent.componentsOrderChanged(); }
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage; package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormComponentPage { protected boolean first = false; protected String button_area_id; protected FormComponentPage previous_page; protected FormComponentPage next_page; public PropertiesPage getProperties() { if(properties == null) { ComponentPropertiesPage properties = new ComponentPropertiesPage(); properties.setComponent(this); this.properties = properties; } return (PropertiesPage)properties; } @Override public XFormsManagerPage getXFormsManager() { return getContext().getXformsManagerFactory().getXformsManagerPage(); } @Override public void remove() { if(getType().equals(FormComponentFactory.page_type_thx)) { //TODO: log warning System.out.println("removing page thx"); } super.remove(); parent.componentsOrderChanged(); }
public ButtonArea getButtonArea() {
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // }
import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage;
if(getType().equals(FormComponentFactory.page_type_thx)) { //TODO: log warning System.out.println("removing page thx"); } super.remove(); parent.componentsOrderChanged(); } public ButtonArea getButtonArea() { return button_area_id == null ? null : (ButtonArea)getContainedComponent(button_area_id); } public ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException { if(getButtonArea() != null) throw new IllegalArgumentException("Button area already exists in the page, remove first"); return (ButtonArea)addComponent(FormComponentFactory.fbc_button_area, component_after_this_id); } public void setButtonAreaComponentId(String button_area_id) { this.button_area_id = button_area_id; } public void setPageSiblings(FormComponentPage previous, FormComponentPage next) { next_page = next; previous_page = previous; } public void pagesSiblingsChanged() { getXFormsManager().pageContextChanged(this);
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java // public interface ButtonArea extends Container { // // public abstract Button getButton(ConstButtonType button_type); // // public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java // public interface PropertiesPage extends PropertiesComponent { // // } // // Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java // public interface FormComponentButtonArea extends FormComponentContainer { // // public abstract void setButtonMapping(String button_type, String button_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract FormComponentPage getCurrentPage(); // // public abstract void announceLastPage(String last_page_id); // } // // Path: src/java/com/idega/documentmanager/component/FormComponentPage.java // public interface FormComponentPage extends FormComponentContainer { // // public abstract void setButtonAreaComponentId(String button_area_id); // // public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next); // // public abstract void pagesSiblingsChanged(); // // public abstract FormComponentPage getPreviousPage(); // // public abstract FormComponentPage getNextPage(); // // public abstract void announceLastPage(String last_page_id); // // public abstract ButtonArea getButtonArea(); // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java // public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage { // // } // // Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java // public interface XFormsManagerPage extends XFormsManagerContainer { // // public abstract void addComponentToDocument(FormComponent component); // // public abstract void removeComponentFromXFormsDocument(FormComponent component); // // public abstract void moveComponent(FormComponent component, // String before_component_id); // // public abstract void pageContextChanged(FormComponent component); // // } // Path: src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.properties.PropertiesPage; import com.idega.documentmanager.component.FormComponentButtonArea; import com.idega.documentmanager.component.FormComponentPage; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage; import com.idega.documentmanager.manager.XFormsManagerPage; if(getType().equals(FormComponentFactory.page_type_thx)) { //TODO: log warning System.out.println("removing page thx"); } super.remove(); parent.componentsOrderChanged(); } public ButtonArea getButtonArea() { return button_area_id == null ? null : (ButtonArea)getContainedComponent(button_area_id); } public ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException { if(getButtonArea() != null) throw new IllegalArgumentException("Button area already exists in the page, remove first"); return (ButtonArea)addComponent(FormComponentFactory.fbc_button_area, component_after_this_id); } public void setButtonAreaComponentId(String button_area_id) { this.button_area_id = button_area_id; } public void setPageSiblings(FormComponentPage previous, FormComponentPage next) { next_page = next; previous_page = previous; } public void pagesSiblingsChanged() { getXFormsManager().pageContextChanged(this);
FormComponentButtonArea button_area = (FormComponentButtonArea)getButtonArea();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerMultiUpload.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUpload extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerMultiUpload.java import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUpload extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component);
public abstract LocalizedStringBean getRemoveButtonLabel(FormComponent component);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/manager/XFormsManagerMultiUpload.java
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // }
import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUpload extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component); public abstract LocalizedStringBean getRemoveButtonLabel(FormComponent component); public abstract LocalizedStringBean getAddButtonLabel(FormComponent component); public abstract LocalizedStringBean getUploadingFileDescription(FormComponent component);
// Path: src/java/com/idega/documentmanager/component/FormComponent.java // public interface FormComponent { // // public abstract void render(); // // public abstract void setComponentAfterThis(FormComponent component); // // public abstract FormComponent getComponentAfterThis(); // // public abstract void setComponentAfterThisRerender(FormComponent component); // // public abstract String getId(); // // public abstract void setId(String id); // // public abstract void setType(String type); // // public abstract String getType(); // // public abstract PropertiesComponent getProperties(); // // public abstract void remove(); // // public abstract void setLoad(boolean load); // // public abstract void setParent(FormComponentContainer parent); // // public abstract void setFormDocument(FormDocument form_document); // // public abstract void addToConfirmationPage(); // // public abstract FormComponentContainer getParent(); // // public abstract void update(ConstUpdateType what); // // public abstract ComponentDataBean getXformsComponentDataBean(); // // public abstract void setXformsComponentDataBean(ComponentDataBean xformsComponentDataBean); // // public abstract FormDocument getFormDocument(); // // public abstract DMContext getContext(); // // public abstract void setContext(DMContext context); // // public abstract void setReadonly(boolean readonly); // // public abstract boolean isReadonly(); // // public abstract void setPdfForm(boolean generatePdf); // // public abstract boolean isPdfForm(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // // Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java // public enum ConstUpdateType { // // LABEL, // CONSTRAINT_REQUIRED, // ERROR_MSG, // P3P_TYPE, // ITEMSET, // EXTERNAL_DATA_SRC, // THANKYOU_TEXT, // AUTOFILL_KEY, // HELP_TEXT, // READ_ONLY, // TEXT, // STEPS_VISUALIZATION_USED, // SUBMISSION_ACTION, // VARIABLE_NAME, // BUTTON_REFER_TO_ACTION, // DATA_SRC_USED, // ADD_BUTTON_LABEL, // REMOVE_BUTTON_LABEL, // DESCRIPTION_BUTTON_LABEL, // UPLOADING_FILE_DESC, // VALIDATION; // } // Path: src/java/com/idega/documentmanager/manager/XFormsManagerMultiUpload.java import com.idega.documentmanager.component.FormComponent; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; package com.idega.documentmanager.manager; /** * @author <a href="mailto:arunas@idega.com">Arūnas Vasmanas</a> * @version $Revision: 1.5 $ * * Last modified: $Date: 2008/07/31 09:58:08 $ by $Author: arunas $ */ public interface XFormsManagerMultiUpload extends XFormsManager{ public abstract void loadXFormsComponentByTypeFromComponentsXForm(FormComponent component, String componentType) throws NullPointerException; public abstract void addComponentToDocument(FormComponent component); public abstract LocalizedStringBean getRemoveButtonLabel(FormComponent component); public abstract LocalizedStringBean getAddButtonLabel(FormComponent component); public abstract LocalizedStringBean getUploadingFileDescription(FormComponent component);
public abstract void update(FormComponent component, ConstUpdateType what);
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormDocument.java
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // }
import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean;
package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale();
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // Path: src/java/com/idega/documentmanager/component/FormDocument.java import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean; package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale();
public abstract Page getConfirmationPage();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormDocument.java
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // }
import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean;
package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale(); public abstract Page getConfirmationPage();
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // Path: src/java/com/idega/documentmanager/component/FormDocument.java import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean; package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale(); public abstract Page getConfirmationPage();
public abstract PageThankYou getThxPage();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormDocument.java
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // }
import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean;
package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale(); public abstract Page getConfirmationPage(); public abstract PageThankYou getThxPage(); public abstract void registerForLastPage(String register_page_id); public abstract String generateNewComponentId(); public abstract Element getAutofillModelElement(); public abstract Element getFormDataModelElement(); public abstract Element getFormMainDataInstanceElement(); public abstract Element getSubmissionElement(); public abstract Element getSectionsVisualizationInstanceElement();
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // Path: src/java/com/idega/documentmanager/component/FormDocument.java import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean; package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale(); public abstract Page getConfirmationPage(); public abstract PageThankYou getThxPage(); public abstract void registerForLastPage(String register_page_id); public abstract String generateNewComponentId(); public abstract Element getAutofillModelElement(); public abstract Element getFormDataModelElement(); public abstract Element getFormMainDataInstanceElement(); public abstract Element getSubmissionElement(); public abstract Element getSectionsVisualizationInstanceElement();
public abstract PropertiesDocument getProperties();
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/FormDocument.java
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // }
import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean;
package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale(); public abstract Page getConfirmationPage(); public abstract PageThankYou getThxPage(); public abstract void registerForLastPage(String register_page_id); public abstract String generateNewComponentId(); public abstract Element getAutofillModelElement(); public abstract Element getFormDataModelElement(); public abstract Element getFormMainDataInstanceElement(); public abstract Element getSubmissionElement(); public abstract Element getSectionsVisualizationInstanceElement(); public abstract PropertiesDocument getProperties(); public abstract String getFormType();
// Path: src/java/com/idega/documentmanager/business/component/Page.java // public interface Page extends Container { // // public abstract PropertiesPage getProperties(); // // public abstract ButtonArea getButtonArea(); // // public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException; // } // // Path: src/java/com/idega/documentmanager/business/component/PageThankYou.java // public interface PageThankYou extends Page { // // public abstract PropertiesThankYouPage getProperties(); // } // // Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesDocument.java // public interface PropertiesDocument extends PropertiesComponent { // // public abstract boolean isStepsVisualizationUsed(); // public abstract void setStepsVisualizationUsed(boolean steps_visualization_used); // // public abstract void setSubmissionAction(String submissionAction); // public abstract String getSubmissionAction(); // } // // Path: src/java/com/idega/documentmanager/component/beans/LocalizedStringBean.java // public class LocalizedStringBean { // // private Map<Locale, String> strings; // // public LocalizedStringBean() { // strings = new HashMap<Locale, String>(); // } // // public LocalizedStringBean(String defaultString) { // strings = new HashMap<Locale, String>(); // setString(new Locale("en"), defaultString); // } // // public Set<Locale> getLanguagesKeySet() { // return strings.keySet(); // } // // /** // * if You don't want to change the text, provide text value as null // * // * @param locale // * @param text // */ // public void setString(Locale locale, String text) { // // if(locale == null) // throw new NullPointerException("Locale is not provided"); // // strings.put(locale, text); // } // // public String getString(Locale locale) { // return strings.get(locale); // } // // public void removeString(Locale locale) { // strings.remove(locale); // } // // public void clear() { // strings.clear(); // } // public String toString() { // // StringBuffer toString = new StringBuffer("LocalizedStringBean:"); // // // for (Iterator<Locale> iter = strings.keySet().iterator(); iter.hasNext();) { // Locale locale = iter.next(); // // toString.append("\nlocale: ") // .append(locale.toString()) // .append(" value: ") // .append(strings.get(locale)); // } // // return toString.toString(); // } // } // Path: src/java/com/idega/documentmanager/component/FormDocument.java import java.util.Locale; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.documentmanager.business.component.Page; import com.idega.documentmanager.business.component.PageThankYou; import com.idega.documentmanager.business.component.properties.PropertiesDocument; import com.idega.documentmanager.component.beans.LocalizedStringBean; package com.idega.documentmanager.component; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.10 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public interface FormDocument extends FormComponentContainer { public abstract void setFormDocumentModified(boolean changed); public abstract boolean isFormDocumentModified(); public abstract Document getComponentsXml(FormComponent component, Locale locale); public abstract Long getFormId(); public abstract Locale getDefaultLocale(); public abstract Page getConfirmationPage(); public abstract PageThankYou getThxPage(); public abstract void registerForLastPage(String register_page_id); public abstract String generateNewComponentId(); public abstract Element getAutofillModelElement(); public abstract Element getFormDataModelElement(); public abstract Element getFormMainDataInstanceElement(); public abstract Element getSubmissionElement(); public abstract Element getSectionsVisualizationInstanceElement(); public abstract PropertiesDocument getProperties(); public abstract String getFormType();
public abstract LocalizedStringBean getFormTitle();
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/engine/Events.java
// Path: src/main/java/br/com/soapboxrace/jaxb/EventsPacketType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "EventsPacketType", propOrder = { "events" }) // @XmlRootElement(name = "EventsPacket") // public class EventsPacketType { // // @XmlElement(name = "Events", required = true) // protected EventsType events; // // public EventsType getEvents() { // return events; // } // // public void setEvents(EventsType value) { // this.events = value; // } // // }
import br.com.soapboxrace.bo.EventsBO; import br.com.soapboxrace.jaxb.EventsPacketType; import br.com.soapboxrace.jaxb.util.MarshalXML;
package br.com.soapboxrace.engine; public class Events extends Router { EventsBO eventsBO = new EventsBO(); public String availableatlevel() { Long userId = getUserId(); String securityToken = getSecurityToken();
// Path: src/main/java/br/com/soapboxrace/jaxb/EventsPacketType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "EventsPacketType", propOrder = { "events" }) // @XmlRootElement(name = "EventsPacket") // public class EventsPacketType { // // @XmlElement(name = "Events", required = true) // protected EventsType events; // // public EventsType getEvents() { // return events; // } // // public void setEvents(EventsType value) { // this.events = value; // } // // } // Path: src/main/java/br/com/soapboxrace/engine/Events.java import br.com.soapboxrace.bo.EventsBO; import br.com.soapboxrace.jaxb.EventsPacketType; import br.com.soapboxrace.jaxb.util.MarshalXML; package br.com.soapboxrace.engine; public class Events extends Router { EventsBO eventsBO = new EventsBO(); public String availableatlevel() { Long userId = getUserId(); String securityToken = getSecurityToken();
EventsPacketType availableatlevel = eventsBO.availableatlevel(userId, securityToken);
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/dao/factory/DaoFactory.java
// Path: src/main/java/br/com/soapboxrace/config/Config.java // public class Config { // // private int httpPort; // private String xmppIp; // private int xmppPort; // private String freeRoamUdpIp; // private int freeRoamUdpPort; // private String raceUdpIp; // private int raceUdpPort; // private String openFireToken; // private String xmppServerType; // private String dbDriver; // private SaveType saveType; // // private static Config instance; // // public static Config getInstance() { // if (Config.instance == null) { // Config.instance = new Config(); // } // return Config.instance; // } // // private Config() { // Properties prop = new Properties(); // InputStream input = null; // try { // input = new FileInputStream("soapbox.properties"); // prop.load(input); // httpPort = Integer.valueOf(prop.getProperty("httpPort")); // xmppIp = prop.getProperty("xmppIp"); // xmppPort = Integer.valueOf(prop.getProperty("xmppPort")); // freeRoamUdpIp = prop.getProperty("freeRoamUdpIp"); // freeRoamUdpPort = Integer.valueOf(prop.getProperty("freeRoamUdpPort")); // raceUdpIp = prop.getProperty("raceUdpIp"); // raceUdpPort = Integer.valueOf(prop.getProperty("raceUdpPort")); // openFireToken = prop.getProperty("openFireToken"); // xmppServerType = prop.getProperty("xmppServerType"); // dbDriver = prop.getProperty("dbDriver"); // saveType = SaveType.valueOf(prop.getProperty("saveType")); // } catch (Exception e) { // System.err.println(e); // } // } // // public int getHttpPort() { // return httpPort; // } // // public String getXmppIp() { // return xmppIp; // } // // public int getXmppPort() { // return xmppPort; // } // // public String getFreeRoamUdpIp() { // return freeRoamUdpIp; // } // // public int getFreeRoamUdpPort() { // return freeRoamUdpPort; // } // // public String getRaceUdpIp() { // return raceUdpIp; // } // // public int getRaceUdpPort() { // return raceUdpPort; // } // // public String getOpenFireToken() { // return openFireToken; // } // // public String getXmppServerType() { // return xmppServerType; // } // // public String getDbDriver() { // return dbDriver; // } // // public SaveType getSaveType() { // return saveType; // } // // }
import br.com.soapboxrace.config.Config;
package br.com.soapboxrace.dao.factory; public class DaoFactory { private static SaveType saveType; static {
// Path: src/main/java/br/com/soapboxrace/config/Config.java // public class Config { // // private int httpPort; // private String xmppIp; // private int xmppPort; // private String freeRoamUdpIp; // private int freeRoamUdpPort; // private String raceUdpIp; // private int raceUdpPort; // private String openFireToken; // private String xmppServerType; // private String dbDriver; // private SaveType saveType; // // private static Config instance; // // public static Config getInstance() { // if (Config.instance == null) { // Config.instance = new Config(); // } // return Config.instance; // } // // private Config() { // Properties prop = new Properties(); // InputStream input = null; // try { // input = new FileInputStream("soapbox.properties"); // prop.load(input); // httpPort = Integer.valueOf(prop.getProperty("httpPort")); // xmppIp = prop.getProperty("xmppIp"); // xmppPort = Integer.valueOf(prop.getProperty("xmppPort")); // freeRoamUdpIp = prop.getProperty("freeRoamUdpIp"); // freeRoamUdpPort = Integer.valueOf(prop.getProperty("freeRoamUdpPort")); // raceUdpIp = prop.getProperty("raceUdpIp"); // raceUdpPort = Integer.valueOf(prop.getProperty("raceUdpPort")); // openFireToken = prop.getProperty("openFireToken"); // xmppServerType = prop.getProperty("xmppServerType"); // dbDriver = prop.getProperty("dbDriver"); // saveType = SaveType.valueOf(prop.getProperty("saveType")); // } catch (Exception e) { // System.err.println(e); // } // } // // public int getHttpPort() { // return httpPort; // } // // public String getXmppIp() { // return xmppIp; // } // // public int getXmppPort() { // return xmppPort; // } // // public String getFreeRoamUdpIp() { // return freeRoamUdpIp; // } // // public int getFreeRoamUdpPort() { // return freeRoamUdpPort; // } // // public String getRaceUdpIp() { // return raceUdpIp; // } // // public int getRaceUdpPort() { // return raceUdpPort; // } // // public String getOpenFireToken() { // return openFireToken; // } // // public String getXmppServerType() { // return xmppServerType; // } // // public String getDbDriver() { // return dbDriver; // } // // public SaveType getSaveType() { // return saveType; // } // // } // Path: src/main/java/br/com/soapboxrace/dao/factory/DaoFactory.java import br.com.soapboxrace.config.Config; package br.com.soapboxrace.dao.factory; public class DaoFactory { private static SaveType saveType; static {
Config config = Config.getInstance();
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/db/ConnectionDB.java
// Path: src/main/java/br/com/soapboxrace/config/Config.java // public class Config { // // private int httpPort; // private String xmppIp; // private int xmppPort; // private String freeRoamUdpIp; // private int freeRoamUdpPort; // private String raceUdpIp; // private int raceUdpPort; // private String openFireToken; // private String xmppServerType; // private String dbDriver; // private SaveType saveType; // // private static Config instance; // // public static Config getInstance() { // if (Config.instance == null) { // Config.instance = new Config(); // } // return Config.instance; // } // // private Config() { // Properties prop = new Properties(); // InputStream input = null; // try { // input = new FileInputStream("soapbox.properties"); // prop.load(input); // httpPort = Integer.valueOf(prop.getProperty("httpPort")); // xmppIp = prop.getProperty("xmppIp"); // xmppPort = Integer.valueOf(prop.getProperty("xmppPort")); // freeRoamUdpIp = prop.getProperty("freeRoamUdpIp"); // freeRoamUdpPort = Integer.valueOf(prop.getProperty("freeRoamUdpPort")); // raceUdpIp = prop.getProperty("raceUdpIp"); // raceUdpPort = Integer.valueOf(prop.getProperty("raceUdpPort")); // openFireToken = prop.getProperty("openFireToken"); // xmppServerType = prop.getProperty("xmppServerType"); // dbDriver = prop.getProperty("dbDriver"); // saveType = SaveType.valueOf(prop.getProperty("saveType")); // } catch (Exception e) { // System.err.println(e); // } // } // // public int getHttpPort() { // return httpPort; // } // // public String getXmppIp() { // return xmppIp; // } // // public int getXmppPort() { // return xmppPort; // } // // public String getFreeRoamUdpIp() { // return freeRoamUdpIp; // } // // public int getFreeRoamUdpPort() { // return freeRoamUdpPort; // } // // public String getRaceUdpIp() { // return raceUdpIp; // } // // public int getRaceUdpPort() { // return raceUdpPort; // } // // public String getOpenFireToken() { // return openFireToken; // } // // public String getXmppServerType() { // return xmppServerType; // } // // public String getDbDriver() { // return dbDriver; // } // // public SaveType getSaveType() { // return saveType; // } // // }
import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import org.hibernate.jpa.HibernatePersistenceProvider; import br.com.soapboxrace.config.Config;
package br.com.soapboxrace.db; public class ConnectionDB { private static final EntityManagerFactory emf; private static final ThreadLocal<EntityManager> threadLocal; static {
// Path: src/main/java/br/com/soapboxrace/config/Config.java // public class Config { // // private int httpPort; // private String xmppIp; // private int xmppPort; // private String freeRoamUdpIp; // private int freeRoamUdpPort; // private String raceUdpIp; // private int raceUdpPort; // private String openFireToken; // private String xmppServerType; // private String dbDriver; // private SaveType saveType; // // private static Config instance; // // public static Config getInstance() { // if (Config.instance == null) { // Config.instance = new Config(); // } // return Config.instance; // } // // private Config() { // Properties prop = new Properties(); // InputStream input = null; // try { // input = new FileInputStream("soapbox.properties"); // prop.load(input); // httpPort = Integer.valueOf(prop.getProperty("httpPort")); // xmppIp = prop.getProperty("xmppIp"); // xmppPort = Integer.valueOf(prop.getProperty("xmppPort")); // freeRoamUdpIp = prop.getProperty("freeRoamUdpIp"); // freeRoamUdpPort = Integer.valueOf(prop.getProperty("freeRoamUdpPort")); // raceUdpIp = prop.getProperty("raceUdpIp"); // raceUdpPort = Integer.valueOf(prop.getProperty("raceUdpPort")); // openFireToken = prop.getProperty("openFireToken"); // xmppServerType = prop.getProperty("xmppServerType"); // dbDriver = prop.getProperty("dbDriver"); // saveType = SaveType.valueOf(prop.getProperty("saveType")); // } catch (Exception e) { // System.err.println(e); // } // } // // public int getHttpPort() { // return httpPort; // } // // public String getXmppIp() { // return xmppIp; // } // // public int getXmppPort() { // return xmppPort; // } // // public String getFreeRoamUdpIp() { // return freeRoamUdpIp; // } // // public int getFreeRoamUdpPort() { // return freeRoamUdpPort; // } // // public String getRaceUdpIp() { // return raceUdpIp; // } // // public int getRaceUdpPort() { // return raceUdpPort; // } // // public String getOpenFireToken() { // return openFireToken; // } // // public String getXmppServerType() { // return xmppServerType; // } // // public String getDbDriver() { // return dbDriver; // } // // public SaveType getSaveType() { // return saveType; // } // // } // Path: src/main/java/br/com/soapboxrace/db/ConnectionDB.java import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import org.hibernate.jpa.HibernatePersistenceProvider; import br.com.soapboxrace.config.Config; package br.com.soapboxrace.db; public class ConnectionDB { private static final EntityManagerFactory emf; private static final ThreadLocal<EntityManager> threadLocal; static {
Config config = Config.getInstance();
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/xmpp/openfire/OpenFireTalk.java
// Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPingType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPingType", propOrder = { "type", "id", "from", "to", "ping" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPingType { // @XmlAttribute(name = "type", required = true) // private String type; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlElement(namespace = "urn:xmpp:ping") // private String ping; // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getPing() { // return ping; // } // // public void setPing(String ping) { // this.ping = ping; // } // } // // Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPongType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPongType", propOrder = { "from", "to", "id", "type" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPongType { // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "type", required = true) // private String type = "result"; // // public XMPP_IQPongType() { // } // // public XMPP_IQPongType(String id) { // from = String.format("nfsw.engine.engine@%s/EA_Chat", Session.getXmppIp()); // to = Session.getXmppIp(); // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // }
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.jaxb.util.UnmarshalXML; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPingType; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPongType;
this.socket = socket; setReaderWriter(); } public Socket getSocket() { return socket; } private void setReaderWriter() { try { reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); writer = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream())); } catch (Exception e) { e.printStackTrace(); } } public String read() { String msg = null; char[] buffer = new char[8192]; int charsRead = 0; try { if ((charsRead = reader.read(buffer)) != -1) { msg = new String(buffer).substring(0, charsRead); } } catch (Exception e) { e.printStackTrace(); } System.out.println("S->C [" + msg + "]"); if (msg.contains("<ping xmlns=\"urn:xmpp:ping\"/>")) {
// Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPingType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPingType", propOrder = { "type", "id", "from", "to", "ping" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPingType { // @XmlAttribute(name = "type", required = true) // private String type; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlElement(namespace = "urn:xmpp:ping") // private String ping; // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getPing() { // return ping; // } // // public void setPing(String ping) { // this.ping = ping; // } // } // // Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPongType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPongType", propOrder = { "from", "to", "id", "type" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPongType { // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "type", required = true) // private String type = "result"; // // public XMPP_IQPongType() { // } // // public XMPP_IQPongType(String id) { // from = String.format("nfsw.engine.engine@%s/EA_Chat", Session.getXmppIp()); // to = Session.getXmppIp(); // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // } // Path: src/main/java/br/com/soapboxrace/xmpp/openfire/OpenFireTalk.java import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.jaxb.util.UnmarshalXML; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPingType; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPongType; this.socket = socket; setReaderWriter(); } public Socket getSocket() { return socket; } private void setReaderWriter() { try { reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); writer = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream())); } catch (Exception e) { e.printStackTrace(); } } public String read() { String msg = null; char[] buffer = new char[8192]; int charsRead = 0; try { if ((charsRead = reader.read(buffer)) != -1) { msg = new String(buffer).substring(0, charsRead); } } catch (Exception e) { e.printStackTrace(); } System.out.println("S->C [" + msg + "]"); if (msg.contains("<ping xmlns=\"urn:xmpp:ping\"/>")) {
XMPP_IQPingType openfirePing = (XMPP_IQPingType) UnmarshalXML.unMarshal(msg, new XMPP_IQPingType());
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/xmpp/openfire/OpenFireTalk.java
// Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPingType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPingType", propOrder = { "type", "id", "from", "to", "ping" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPingType { // @XmlAttribute(name = "type", required = true) // private String type; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlElement(namespace = "urn:xmpp:ping") // private String ping; // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getPing() { // return ping; // } // // public void setPing(String ping) { // this.ping = ping; // } // } // // Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPongType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPongType", propOrder = { "from", "to", "id", "type" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPongType { // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "type", required = true) // private String type = "result"; // // public XMPP_IQPongType() { // } // // public XMPP_IQPongType(String id) { // from = String.format("nfsw.engine.engine@%s/EA_Chat", Session.getXmppIp()); // to = Session.getXmppIp(); // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // }
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.jaxb.util.UnmarshalXML; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPingType; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPongType;
setReaderWriter(); } public Socket getSocket() { return socket; } private void setReaderWriter() { try { reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); writer = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream())); } catch (Exception e) { e.printStackTrace(); } } public String read() { String msg = null; char[] buffer = new char[8192]; int charsRead = 0; try { if ((charsRead = reader.read(buffer)) != -1) { msg = new String(buffer).substring(0, charsRead); } } catch (Exception e) { e.printStackTrace(); } System.out.println("S->C [" + msg + "]"); if (msg.contains("<ping xmlns=\"urn:xmpp:ping\"/>")) { XMPP_IQPingType openfirePing = (XMPP_IQPingType) UnmarshalXML.unMarshal(msg, new XMPP_IQPingType());
// Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPingType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPingType", propOrder = { "type", "id", "from", "to", "ping" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPingType { // @XmlAttribute(name = "type", required = true) // private String type; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlElement(namespace = "urn:xmpp:ping") // private String ping; // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getPing() { // return ping; // } // // public void setPing(String ping) { // this.ping = ping; // } // } // // Path: src/main/java/br/com/soapboxrace/xmpp/jaxb/XMPP_IQPongType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "XMPP_IQPongType", propOrder = { "from", "to", "id", "type" }) // @XmlRootElement(name = "iq") // public class XMPP_IQPongType { // @XmlAttribute(name = "from") // private String from; // @XmlAttribute(name = "to") // private String to; // @XmlAttribute(name = "id") // private String id; // @XmlAttribute(name = "type", required = true) // private String type = "result"; // // public XMPP_IQPongType() { // } // // public XMPP_IQPongType(String id) { // from = String.format("nfsw.engine.engine@%s/EA_Chat", Session.getXmppIp()); // to = Session.getXmppIp(); // this.id = id; // } // // public String getFrom() { // return from; // } // // public void setFrom(String from) { // this.from = from; // } // // public String getTo() { // return to; // } // // public void setTo(String to) { // this.to = to; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getType() { // return type; // } // // public void setType(String type) { // this.type = type; // } // } // Path: src/main/java/br/com/soapboxrace/xmpp/openfire/OpenFireTalk.java import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.jaxb.util.UnmarshalXML; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPingType; import br.com.soapboxrace.xmpp.jaxb.XMPP_IQPongType; setReaderWriter(); } public Socket getSocket() { return socket; } private void setReaderWriter() { try { reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); writer = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream())); } catch (Exception e) { e.printStackTrace(); } } public String read() { String msg = null; char[] buffer = new char[8192]; int charsRead = 0; try { if ((charsRead = reader.read(buffer)) != -1) { msg = new String(buffer).substring(0, charsRead); } } catch (Exception e) { e.printStackTrace(); } System.out.println("S->C [" + msg + "]"); if (msg.contains("<ping xmlns=\"urn:xmpp:ping\"/>")) { XMPP_IQPingType openfirePing = (XMPP_IQPingType) UnmarshalXML.unMarshal(msg, new XMPP_IQPingType());
write(MarshalXML.marshal(new XMPP_IQPongType(openfirePing.getId())));
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/dao/xml/CategoryDao.java
// Path: src/main/java/br/com/soapboxrace/jaxb/ArrayOfCategoryTrans.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "ArrayOfCategoryTrans") // @XmlRootElement(name = "ArrayOfCategoryTrans") // public class ArrayOfCategoryTrans { // // @XmlElement(name = "CategoryTrans") // private List<CategoryEntity> categoryEntityList; // // public List<CategoryEntity> getCategoryEntityList() // { // return categoryEntityList; // } // // public void setCategoryEntityList(List<CategoryEntity> categoryEntityList) // { // this.categoryEntityList = categoryEntityList; // } // // } // // Path: src/main/java/br/com/soapboxrace/jpa/CategoryEntity.java // @Entity // @Table(name = "CATEGORY") // @XmlAccessorType(XmlAccessType.FIELD) // public class CategoryEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = -5211533179221745050L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "idcategory", nullable = false) // @XmlTransient // private long idcategory; // // @XmlElement(name = "CatalogVersion", required = true) // protected String catalogVersion; // @XmlElement(name = "Categories") // protected String categories; // @XmlElement(name = "DisplayName", required = true) // protected String displayName; // @XmlElement(name = "FilterType", required = true) // protected Integer filterType; // @XmlElement(name = "Icon", required = true) // protected String icon; // @XmlElement(name = "Id", required = true) // protected Long id; // @XmlElement(name = "LongDescription", required = true) // protected String longDescription; // @XmlElement(name = "Name", required = true) // protected String name; // @XmlElement(name = "Priority", required = true) // protected Short priority; // // @XmlElement(name="ProductTrans", type = VinylProductEntity.class) // @XmlElementWrapper(name="Products") // @OneToMany(mappedBy = "category", targetEntity = VinylProductEntity.class) // private List<VinylProductEntity> listOfVinyls; // // @XmlElement(name = "ShortDescription", required = true) // protected String shortDescription; // @XmlElement(name = "ShowInNavigationPane", required = true) // protected Boolean showInNavigationPane; // @XmlElement(name = "ShowPromoPage", required = true) // protected Boolean showPromoPage; // @XmlElement(name = "WebIcon", required = true) // protected String webIcon; // // public void setId(Long id) { // this.idcategory = id; // } // public Long getId() { // return idcategory; // } // // public String getCatalogVersion() { // return catalogVersion; // } // public void setCatalogVersion(String catalogVersion) { // this.catalogVersion = catalogVersion; // } // // public String getCategories() { // return categories; // } // public void setCategories(String categories) { // this.categories = categories; // } // // public String getDisplayName() { // return displayName; // } // public void setDisplayName(String displayName) { // this.displayName = displayName; // } // // public Integer getFilterType() { // return filterType; // } // public void setFilterType(Integer filterType) { // this.filterType = filterType; // } // // public String getIcon() { // return icon; // } // public void setIcon(String icon) { // this.icon = icon; // } // // public String getLongDescription() { // return longDescription; // } // public void setLongDescription(String longDescription) { // this.longDescription = longDescription; // } // // public String getName() { // return name; // } // public void setName(String name) { // this.name = name; // } // // public Short getPriority() { // return priority; // } // public void setPriority(Short priority) { // this.priority = priority; // } // // public List<VinylProductEntity> getListOfVinyls() { // return listOfVinyls; // } // public void setListOfVinyls(List<VinylProductEntity> listOfVinyls) { // this.listOfVinyls = listOfVinyls; // } // // public String getShortDescription() { // return shortDescription; // } // public void setShortDescription(String shortDescription) { // this.shortDescription = shortDescription; // } // // public Boolean getShowInNavigationPane() { // return showInNavigationPane; // } // public void setShowInNavigationPane(Boolean showInNavigationPane) { // this.showInNavigationPane = showInNavigationPane; // } // // public Boolean getShowPromoPage() { // return showPromoPage; // } // public void setShowPromoPage(Boolean showPromoPage) { // this.showPromoPage = showPromoPage; // } // // public String getWebIcon() { // return webIcon; // } // public void setWebIcon(String webIcon) { // this.webIcon = webIcon; // } // }
import br.com.soapboxrace.dao.factory.ICategoryDao; import br.com.soapboxrace.jaxb.ArrayOfCategoryTrans; import br.com.soapboxrace.jpa.CategoryEntity;
package br.com.soapboxrace.dao.xml; public class CategoryDao extends SoapboxDao implements ICategoryDao { @Override
// Path: src/main/java/br/com/soapboxrace/jaxb/ArrayOfCategoryTrans.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "ArrayOfCategoryTrans") // @XmlRootElement(name = "ArrayOfCategoryTrans") // public class ArrayOfCategoryTrans { // // @XmlElement(name = "CategoryTrans") // private List<CategoryEntity> categoryEntityList; // // public List<CategoryEntity> getCategoryEntityList() // { // return categoryEntityList; // } // // public void setCategoryEntityList(List<CategoryEntity> categoryEntityList) // { // this.categoryEntityList = categoryEntityList; // } // // } // // Path: src/main/java/br/com/soapboxrace/jpa/CategoryEntity.java // @Entity // @Table(name = "CATEGORY") // @XmlAccessorType(XmlAccessType.FIELD) // public class CategoryEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = -5211533179221745050L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "idcategory", nullable = false) // @XmlTransient // private long idcategory; // // @XmlElement(name = "CatalogVersion", required = true) // protected String catalogVersion; // @XmlElement(name = "Categories") // protected String categories; // @XmlElement(name = "DisplayName", required = true) // protected String displayName; // @XmlElement(name = "FilterType", required = true) // protected Integer filterType; // @XmlElement(name = "Icon", required = true) // protected String icon; // @XmlElement(name = "Id", required = true) // protected Long id; // @XmlElement(name = "LongDescription", required = true) // protected String longDescription; // @XmlElement(name = "Name", required = true) // protected String name; // @XmlElement(name = "Priority", required = true) // protected Short priority; // // @XmlElement(name="ProductTrans", type = VinylProductEntity.class) // @XmlElementWrapper(name="Products") // @OneToMany(mappedBy = "category", targetEntity = VinylProductEntity.class) // private List<VinylProductEntity> listOfVinyls; // // @XmlElement(name = "ShortDescription", required = true) // protected String shortDescription; // @XmlElement(name = "ShowInNavigationPane", required = true) // protected Boolean showInNavigationPane; // @XmlElement(name = "ShowPromoPage", required = true) // protected Boolean showPromoPage; // @XmlElement(name = "WebIcon", required = true) // protected String webIcon; // // public void setId(Long id) { // this.idcategory = id; // } // public Long getId() { // return idcategory; // } // // public String getCatalogVersion() { // return catalogVersion; // } // public void setCatalogVersion(String catalogVersion) { // this.catalogVersion = catalogVersion; // } // // public String getCategories() { // return categories; // } // public void setCategories(String categories) { // this.categories = categories; // } // // public String getDisplayName() { // return displayName; // } // public void setDisplayName(String displayName) { // this.displayName = displayName; // } // // public Integer getFilterType() { // return filterType; // } // public void setFilterType(Integer filterType) { // this.filterType = filterType; // } // // public String getIcon() { // return icon; // } // public void setIcon(String icon) { // this.icon = icon; // } // // public String getLongDescription() { // return longDescription; // } // public void setLongDescription(String longDescription) { // this.longDescription = longDescription; // } // // public String getName() { // return name; // } // public void setName(String name) { // this.name = name; // } // // public Short getPriority() { // return priority; // } // public void setPriority(Short priority) { // this.priority = priority; // } // // public List<VinylProductEntity> getListOfVinyls() { // return listOfVinyls; // } // public void setListOfVinyls(List<VinylProductEntity> listOfVinyls) { // this.listOfVinyls = listOfVinyls; // } // // public String getShortDescription() { // return shortDescription; // } // public void setShortDescription(String shortDescription) { // this.shortDescription = shortDescription; // } // // public Boolean getShowInNavigationPane() { // return showInNavigationPane; // } // public void setShowInNavigationPane(Boolean showInNavigationPane) { // this.showInNavigationPane = showInNavigationPane; // } // // public Boolean getShowPromoPage() { // return showPromoPage; // } // public void setShowPromoPage(Boolean showPromoPage) { // this.showPromoPage = showPromoPage; // } // // public String getWebIcon() { // return webIcon; // } // public void setWebIcon(String webIcon) { // this.webIcon = webIcon; // } // } // Path: src/main/java/br/com/soapboxrace/dao/xml/CategoryDao.java import br.com.soapboxrace.dao.factory.ICategoryDao; import br.com.soapboxrace.jaxb.ArrayOfCategoryTrans; import br.com.soapboxrace.jpa.CategoryEntity; package br.com.soapboxrace.dao.xml; public class CategoryDao extends SoapboxDao implements ICategoryDao { @Override
public CategoryEntity findById(Long id) {
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/dao/xml/CategoryDao.java
// Path: src/main/java/br/com/soapboxrace/jaxb/ArrayOfCategoryTrans.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "ArrayOfCategoryTrans") // @XmlRootElement(name = "ArrayOfCategoryTrans") // public class ArrayOfCategoryTrans { // // @XmlElement(name = "CategoryTrans") // private List<CategoryEntity> categoryEntityList; // // public List<CategoryEntity> getCategoryEntityList() // { // return categoryEntityList; // } // // public void setCategoryEntityList(List<CategoryEntity> categoryEntityList) // { // this.categoryEntityList = categoryEntityList; // } // // } // // Path: src/main/java/br/com/soapboxrace/jpa/CategoryEntity.java // @Entity // @Table(name = "CATEGORY") // @XmlAccessorType(XmlAccessType.FIELD) // public class CategoryEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = -5211533179221745050L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "idcategory", nullable = false) // @XmlTransient // private long idcategory; // // @XmlElement(name = "CatalogVersion", required = true) // protected String catalogVersion; // @XmlElement(name = "Categories") // protected String categories; // @XmlElement(name = "DisplayName", required = true) // protected String displayName; // @XmlElement(name = "FilterType", required = true) // protected Integer filterType; // @XmlElement(name = "Icon", required = true) // protected String icon; // @XmlElement(name = "Id", required = true) // protected Long id; // @XmlElement(name = "LongDescription", required = true) // protected String longDescription; // @XmlElement(name = "Name", required = true) // protected String name; // @XmlElement(name = "Priority", required = true) // protected Short priority; // // @XmlElement(name="ProductTrans", type = VinylProductEntity.class) // @XmlElementWrapper(name="Products") // @OneToMany(mappedBy = "category", targetEntity = VinylProductEntity.class) // private List<VinylProductEntity> listOfVinyls; // // @XmlElement(name = "ShortDescription", required = true) // protected String shortDescription; // @XmlElement(name = "ShowInNavigationPane", required = true) // protected Boolean showInNavigationPane; // @XmlElement(name = "ShowPromoPage", required = true) // protected Boolean showPromoPage; // @XmlElement(name = "WebIcon", required = true) // protected String webIcon; // // public void setId(Long id) { // this.idcategory = id; // } // public Long getId() { // return idcategory; // } // // public String getCatalogVersion() { // return catalogVersion; // } // public void setCatalogVersion(String catalogVersion) { // this.catalogVersion = catalogVersion; // } // // public String getCategories() { // return categories; // } // public void setCategories(String categories) { // this.categories = categories; // } // // public String getDisplayName() { // return displayName; // } // public void setDisplayName(String displayName) { // this.displayName = displayName; // } // // public Integer getFilterType() { // return filterType; // } // public void setFilterType(Integer filterType) { // this.filterType = filterType; // } // // public String getIcon() { // return icon; // } // public void setIcon(String icon) { // this.icon = icon; // } // // public String getLongDescription() { // return longDescription; // } // public void setLongDescription(String longDescription) { // this.longDescription = longDescription; // } // // public String getName() { // return name; // } // public void setName(String name) { // this.name = name; // } // // public Short getPriority() { // return priority; // } // public void setPriority(Short priority) { // this.priority = priority; // } // // public List<VinylProductEntity> getListOfVinyls() { // return listOfVinyls; // } // public void setListOfVinyls(List<VinylProductEntity> listOfVinyls) { // this.listOfVinyls = listOfVinyls; // } // // public String getShortDescription() { // return shortDescription; // } // public void setShortDescription(String shortDescription) { // this.shortDescription = shortDescription; // } // // public Boolean getShowInNavigationPane() { // return showInNavigationPane; // } // public void setShowInNavigationPane(Boolean showInNavigationPane) { // this.showInNavigationPane = showInNavigationPane; // } // // public Boolean getShowPromoPage() { // return showPromoPage; // } // public void setShowPromoPage(Boolean showPromoPage) { // this.showPromoPage = showPromoPage; // } // // public String getWebIcon() { // return webIcon; // } // public void setWebIcon(String webIcon) { // this.webIcon = webIcon; // } // }
import br.com.soapboxrace.dao.factory.ICategoryDao; import br.com.soapboxrace.jaxb.ArrayOfCategoryTrans; import br.com.soapboxrace.jpa.CategoryEntity;
package br.com.soapboxrace.dao.xml; public class CategoryDao extends SoapboxDao implements ICategoryDao { @Override public CategoryEntity findById(Long id) { CategoryEntity entity = (CategoryEntity) super.findById(CategoryEntity.class, id); return entity; }
// Path: src/main/java/br/com/soapboxrace/jaxb/ArrayOfCategoryTrans.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "ArrayOfCategoryTrans") // @XmlRootElement(name = "ArrayOfCategoryTrans") // public class ArrayOfCategoryTrans { // // @XmlElement(name = "CategoryTrans") // private List<CategoryEntity> categoryEntityList; // // public List<CategoryEntity> getCategoryEntityList() // { // return categoryEntityList; // } // // public void setCategoryEntityList(List<CategoryEntity> categoryEntityList) // { // this.categoryEntityList = categoryEntityList; // } // // } // // Path: src/main/java/br/com/soapboxrace/jpa/CategoryEntity.java // @Entity // @Table(name = "CATEGORY") // @XmlAccessorType(XmlAccessType.FIELD) // public class CategoryEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = -5211533179221745050L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "idcategory", nullable = false) // @XmlTransient // private long idcategory; // // @XmlElement(name = "CatalogVersion", required = true) // protected String catalogVersion; // @XmlElement(name = "Categories") // protected String categories; // @XmlElement(name = "DisplayName", required = true) // protected String displayName; // @XmlElement(name = "FilterType", required = true) // protected Integer filterType; // @XmlElement(name = "Icon", required = true) // protected String icon; // @XmlElement(name = "Id", required = true) // protected Long id; // @XmlElement(name = "LongDescription", required = true) // protected String longDescription; // @XmlElement(name = "Name", required = true) // protected String name; // @XmlElement(name = "Priority", required = true) // protected Short priority; // // @XmlElement(name="ProductTrans", type = VinylProductEntity.class) // @XmlElementWrapper(name="Products") // @OneToMany(mappedBy = "category", targetEntity = VinylProductEntity.class) // private List<VinylProductEntity> listOfVinyls; // // @XmlElement(name = "ShortDescription", required = true) // protected String shortDescription; // @XmlElement(name = "ShowInNavigationPane", required = true) // protected Boolean showInNavigationPane; // @XmlElement(name = "ShowPromoPage", required = true) // protected Boolean showPromoPage; // @XmlElement(name = "WebIcon", required = true) // protected String webIcon; // // public void setId(Long id) { // this.idcategory = id; // } // public Long getId() { // return idcategory; // } // // public String getCatalogVersion() { // return catalogVersion; // } // public void setCatalogVersion(String catalogVersion) { // this.catalogVersion = catalogVersion; // } // // public String getCategories() { // return categories; // } // public void setCategories(String categories) { // this.categories = categories; // } // // public String getDisplayName() { // return displayName; // } // public void setDisplayName(String displayName) { // this.displayName = displayName; // } // // public Integer getFilterType() { // return filterType; // } // public void setFilterType(Integer filterType) { // this.filterType = filterType; // } // // public String getIcon() { // return icon; // } // public void setIcon(String icon) { // this.icon = icon; // } // // public String getLongDescription() { // return longDescription; // } // public void setLongDescription(String longDescription) { // this.longDescription = longDescription; // } // // public String getName() { // return name; // } // public void setName(String name) { // this.name = name; // } // // public Short getPriority() { // return priority; // } // public void setPriority(Short priority) { // this.priority = priority; // } // // public List<VinylProductEntity> getListOfVinyls() { // return listOfVinyls; // } // public void setListOfVinyls(List<VinylProductEntity> listOfVinyls) { // this.listOfVinyls = listOfVinyls; // } // // public String getShortDescription() { // return shortDescription; // } // public void setShortDescription(String shortDescription) { // this.shortDescription = shortDescription; // } // // public Boolean getShowInNavigationPane() { // return showInNavigationPane; // } // public void setShowInNavigationPane(Boolean showInNavigationPane) { // this.showInNavigationPane = showInNavigationPane; // } // // public Boolean getShowPromoPage() { // return showPromoPage; // } // public void setShowPromoPage(Boolean showPromoPage) { // this.showPromoPage = showPromoPage; // } // // public String getWebIcon() { // return webIcon; // } // public void setWebIcon(String webIcon) { // this.webIcon = webIcon; // } // } // Path: src/main/java/br/com/soapboxrace/dao/xml/CategoryDao.java import br.com.soapboxrace.dao.factory.ICategoryDao; import br.com.soapboxrace.jaxb.ArrayOfCategoryTrans; import br.com.soapboxrace.jpa.CategoryEntity; package br.com.soapboxrace.dao.xml; public class CategoryDao extends SoapboxDao implements ICategoryDao { @Override public CategoryEntity findById(Long id) { CategoryEntity entity = (CategoryEntity) super.findById(CategoryEntity.class, id); return entity; }
public ArrayOfCategoryTrans getAll() {
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/jaxb/ArrayOfCategoryTrans.java
// Path: src/main/java/br/com/soapboxrace/jpa/CategoryEntity.java // @Entity // @Table(name = "CATEGORY") // @XmlAccessorType(XmlAccessType.FIELD) // public class CategoryEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = -5211533179221745050L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "idcategory", nullable = false) // @XmlTransient // private long idcategory; // // @XmlElement(name = "CatalogVersion", required = true) // protected String catalogVersion; // @XmlElement(name = "Categories") // protected String categories; // @XmlElement(name = "DisplayName", required = true) // protected String displayName; // @XmlElement(name = "FilterType", required = true) // protected Integer filterType; // @XmlElement(name = "Icon", required = true) // protected String icon; // @XmlElement(name = "Id", required = true) // protected Long id; // @XmlElement(name = "LongDescription", required = true) // protected String longDescription; // @XmlElement(name = "Name", required = true) // protected String name; // @XmlElement(name = "Priority", required = true) // protected Short priority; // // @XmlElement(name="ProductTrans", type = VinylProductEntity.class) // @XmlElementWrapper(name="Products") // @OneToMany(mappedBy = "category", targetEntity = VinylProductEntity.class) // private List<VinylProductEntity> listOfVinyls; // // @XmlElement(name = "ShortDescription", required = true) // protected String shortDescription; // @XmlElement(name = "ShowInNavigationPane", required = true) // protected Boolean showInNavigationPane; // @XmlElement(name = "ShowPromoPage", required = true) // protected Boolean showPromoPage; // @XmlElement(name = "WebIcon", required = true) // protected String webIcon; // // public void setId(Long id) { // this.idcategory = id; // } // public Long getId() { // return idcategory; // } // // public String getCatalogVersion() { // return catalogVersion; // } // public void setCatalogVersion(String catalogVersion) { // this.catalogVersion = catalogVersion; // } // // public String getCategories() { // return categories; // } // public void setCategories(String categories) { // this.categories = categories; // } // // public String getDisplayName() { // return displayName; // } // public void setDisplayName(String displayName) { // this.displayName = displayName; // } // // public Integer getFilterType() { // return filterType; // } // public void setFilterType(Integer filterType) { // this.filterType = filterType; // } // // public String getIcon() { // return icon; // } // public void setIcon(String icon) { // this.icon = icon; // } // // public String getLongDescription() { // return longDescription; // } // public void setLongDescription(String longDescription) { // this.longDescription = longDescription; // } // // public String getName() { // return name; // } // public void setName(String name) { // this.name = name; // } // // public Short getPriority() { // return priority; // } // public void setPriority(Short priority) { // this.priority = priority; // } // // public List<VinylProductEntity> getListOfVinyls() { // return listOfVinyls; // } // public void setListOfVinyls(List<VinylProductEntity> listOfVinyls) { // this.listOfVinyls = listOfVinyls; // } // // public String getShortDescription() { // return shortDescription; // } // public void setShortDescription(String shortDescription) { // this.shortDescription = shortDescription; // } // // public Boolean getShowInNavigationPane() { // return showInNavigationPane; // } // public void setShowInNavigationPane(Boolean showInNavigationPane) { // this.showInNavigationPane = showInNavigationPane; // } // // public Boolean getShowPromoPage() { // return showPromoPage; // } // public void setShowPromoPage(Boolean showPromoPage) { // this.showPromoPage = showPromoPage; // } // // public String getWebIcon() { // return webIcon; // } // public void setWebIcon(String webIcon) { // this.webIcon = webIcon; // } // }
import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import br.com.soapboxrace.jpa.CategoryEntity;
package br.com.soapboxrace.jaxb; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArrayOfCategoryTrans") @XmlRootElement(name = "ArrayOfCategoryTrans") public class ArrayOfCategoryTrans { @XmlElement(name = "CategoryTrans")
// Path: src/main/java/br/com/soapboxrace/jpa/CategoryEntity.java // @Entity // @Table(name = "CATEGORY") // @XmlAccessorType(XmlAccessType.FIELD) // public class CategoryEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = -5211533179221745050L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "idcategory", nullable = false) // @XmlTransient // private long idcategory; // // @XmlElement(name = "CatalogVersion", required = true) // protected String catalogVersion; // @XmlElement(name = "Categories") // protected String categories; // @XmlElement(name = "DisplayName", required = true) // protected String displayName; // @XmlElement(name = "FilterType", required = true) // protected Integer filterType; // @XmlElement(name = "Icon", required = true) // protected String icon; // @XmlElement(name = "Id", required = true) // protected Long id; // @XmlElement(name = "LongDescription", required = true) // protected String longDescription; // @XmlElement(name = "Name", required = true) // protected String name; // @XmlElement(name = "Priority", required = true) // protected Short priority; // // @XmlElement(name="ProductTrans", type = VinylProductEntity.class) // @XmlElementWrapper(name="Products") // @OneToMany(mappedBy = "category", targetEntity = VinylProductEntity.class) // private List<VinylProductEntity> listOfVinyls; // // @XmlElement(name = "ShortDescription", required = true) // protected String shortDescription; // @XmlElement(name = "ShowInNavigationPane", required = true) // protected Boolean showInNavigationPane; // @XmlElement(name = "ShowPromoPage", required = true) // protected Boolean showPromoPage; // @XmlElement(name = "WebIcon", required = true) // protected String webIcon; // // public void setId(Long id) { // this.idcategory = id; // } // public Long getId() { // return idcategory; // } // // public String getCatalogVersion() { // return catalogVersion; // } // public void setCatalogVersion(String catalogVersion) { // this.catalogVersion = catalogVersion; // } // // public String getCategories() { // return categories; // } // public void setCategories(String categories) { // this.categories = categories; // } // // public String getDisplayName() { // return displayName; // } // public void setDisplayName(String displayName) { // this.displayName = displayName; // } // // public Integer getFilterType() { // return filterType; // } // public void setFilterType(Integer filterType) { // this.filterType = filterType; // } // // public String getIcon() { // return icon; // } // public void setIcon(String icon) { // this.icon = icon; // } // // public String getLongDescription() { // return longDescription; // } // public void setLongDescription(String longDescription) { // this.longDescription = longDescription; // } // // public String getName() { // return name; // } // public void setName(String name) { // this.name = name; // } // // public Short getPriority() { // return priority; // } // public void setPriority(Short priority) { // this.priority = priority; // } // // public List<VinylProductEntity> getListOfVinyls() { // return listOfVinyls; // } // public void setListOfVinyls(List<VinylProductEntity> listOfVinyls) { // this.listOfVinyls = listOfVinyls; // } // // public String getShortDescription() { // return shortDescription; // } // public void setShortDescription(String shortDescription) { // this.shortDescription = shortDescription; // } // // public Boolean getShowInNavigationPane() { // return showInNavigationPane; // } // public void setShowInNavigationPane(Boolean showInNavigationPane) { // this.showInNavigationPane = showInNavigationPane; // } // // public Boolean getShowPromoPage() { // return showPromoPage; // } // public void setShowPromoPage(Boolean showPromoPage) { // this.showPromoPage = showPromoPage; // } // // public String getWebIcon() { // return webIcon; // } // public void setWebIcon(String webIcon) { // this.webIcon = webIcon; // } // } // Path: src/main/java/br/com/soapboxrace/jaxb/ArrayOfCategoryTrans.java import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import br.com.soapboxrace.jpa.CategoryEntity; package br.com.soapboxrace.jaxb; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArrayOfCategoryTrans") @XmlRootElement(name = "ArrayOfCategoryTrans") public class ArrayOfCategoryTrans { @XmlElement(name = "CategoryTrans")
private List<CategoryEntity> categoryEntityList;
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/jpa/BasketDefinitionEntity.java
// Path: src/main/java/br/com/soapboxrace/jaxb/OwnedCarTransType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "OwnedCarTransType", propOrder = { "customCar", "durability", "expirationDate", "heatLevel", // "uniqueCarId", "ownershipType" }) // @XmlRootElement(name = "OwnedCarTrans") // public class OwnedCarTransType { // // @XmlElement(name = "CustomCar") // protected CustomCarType customCar; // @XmlElement(name = "Durability") // protected short durability; // @XmlElement(name = "ExpirationDate") // protected String expirationDate; // @XmlElement(name = "Heat") // protected short heatLevel; // @XmlElement(name = "Id") // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // protected long uniqueCarId; // @XmlElement(name = "OwnershipType") // protected String ownershipType; // // public CustomCarType getCustomCar() { // return this.customCar; // } // // public void setCustomCar(CustomCarType value) { // this.customCar = value; // } // // public short getDurability() { // return durability; // } // // public void setDurability(short value) { // this.durability = value; // } // // public String getExpirationDate() { // return expirationDate; // } // // public void setExpirationDate(String value) { // this.expirationDate = value; // } // // public short getHeatLevel() { // return heatLevel; // } // // public void setHeatLevel(short value) { // this.heatLevel = value; // } // // public long getUniqueCarId() { // return uniqueCarId; // } // // public void setUniqueCarId(long value) { // this.uniqueCarId = value; // } // // public String getOwnershipType() { // return ownershipType; // } // // public void setOwnershipType(String value) { // this.ownershipType = value; // } // }
import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import br.com.soapboxrace.jaxb.OwnedCarTransType; import br.com.soapboxrace.jaxb.convert.OwnedCarTransConverter;
package br.com.soapboxrace.jpa; @Entity @Table(name = "BASKETDEFINITION") public class BasketDefinitionEntity implements ISoapBoxEntity { private static final long serialVersionUID = 5314835854384144787L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", nullable = false) private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name = "ProductId") private String productId; @Convert(converter = OwnedCarTransConverter.class) @Column(name = "OwnedCarTrans", length = 40000)
// Path: src/main/java/br/com/soapboxrace/jaxb/OwnedCarTransType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "OwnedCarTransType", propOrder = { "customCar", "durability", "expirationDate", "heatLevel", // "uniqueCarId", "ownershipType" }) // @XmlRootElement(name = "OwnedCarTrans") // public class OwnedCarTransType { // // @XmlElement(name = "CustomCar") // protected CustomCarType customCar; // @XmlElement(name = "Durability") // protected short durability; // @XmlElement(name = "ExpirationDate") // protected String expirationDate; // @XmlElement(name = "Heat") // protected short heatLevel; // @XmlElement(name = "Id") // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // protected long uniqueCarId; // @XmlElement(name = "OwnershipType") // protected String ownershipType; // // public CustomCarType getCustomCar() { // return this.customCar; // } // // public void setCustomCar(CustomCarType value) { // this.customCar = value; // } // // public short getDurability() { // return durability; // } // // public void setDurability(short value) { // this.durability = value; // } // // public String getExpirationDate() { // return expirationDate; // } // // public void setExpirationDate(String value) { // this.expirationDate = value; // } // // public short getHeatLevel() { // return heatLevel; // } // // public void setHeatLevel(short value) { // this.heatLevel = value; // } // // public long getUniqueCarId() { // return uniqueCarId; // } // // public void setUniqueCarId(long value) { // this.uniqueCarId = value; // } // // public String getOwnershipType() { // return ownershipType; // } // // public void setOwnershipType(String value) { // this.ownershipType = value; // } // } // Path: src/main/java/br/com/soapboxrace/jpa/BasketDefinitionEntity.java import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import br.com.soapboxrace.jaxb.OwnedCarTransType; import br.com.soapboxrace.jaxb.convert.OwnedCarTransConverter; package br.com.soapboxrace.jpa; @Entity @Table(name = "BASKETDEFINITION") public class BasketDefinitionEntity implements ISoapBoxEntity { private static final long serialVersionUID = 5314835854384144787L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", nullable = false) private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name = "ProductId") private String productId; @Convert(converter = OwnedCarTransConverter.class) @Column(name = "OwnedCarTrans", length = 40000)
private OwnedCarTransType ownedCarTrans;
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/engine/User.java
// Path: src/main/java/br/com/soapboxrace/jaxb/UserInfoType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "UserInfoType", propOrder = { "defaultPersonaIdx", "personas", "user" }) // @XmlRootElement(name = "UserInfo") // public class UserInfoType { // // protected int defaultPersonaIdx; // @XmlElement(required = true) // protected PersonasType personas; // @XmlElement(required = true) // protected UserType user; // // public int getDefaultPersonaIdx() { // return defaultPersonaIdx; // } // // public void setDefaultPersonaIdx(int defaultPersonaIdx) { // this.defaultPersonaIdx = defaultPersonaIdx; // } // // public PersonasType getPersonas() { // return personas; // } // // public void setPersonas(PersonasType personas) { // this.personas = personas; // } // // public UserType getUser() { // return user; // } // // public void setUser(UserType user) { // this.user = user; // } // // } // // Path: src/main/java/br/com/soapboxrace/xmpp/IXmppSender.java // public interface IXmppSender { // // public void send(String msg, Long to); // // public void send(Object object, Long to); // // public void createUpdatePersona(Long id, String password); // // }
import br.com.soapboxrace.bo.UserBO; import br.com.soapboxrace.definition.ServerExceptions.EngineException; import br.com.soapboxrace.jaxb.UserInfoType; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.xmpp.IXmppSender; import br.com.soapboxrace.xmpp.XmppFactory;
package br.com.soapboxrace.engine; public class User extends Router { private UserBO userBO = new UserBO(); public String getPermanentSession() throws EngineException { Long userId = Long.valueOf(getHeader("userId")); checkSecurityToken(); // first 16 token chars used to login xmpp server String tokenText = "1234567890123456" + shuffleString(getSecureRandomText());
// Path: src/main/java/br/com/soapboxrace/jaxb/UserInfoType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "UserInfoType", propOrder = { "defaultPersonaIdx", "personas", "user" }) // @XmlRootElement(name = "UserInfo") // public class UserInfoType { // // protected int defaultPersonaIdx; // @XmlElement(required = true) // protected PersonasType personas; // @XmlElement(required = true) // protected UserType user; // // public int getDefaultPersonaIdx() { // return defaultPersonaIdx; // } // // public void setDefaultPersonaIdx(int defaultPersonaIdx) { // this.defaultPersonaIdx = defaultPersonaIdx; // } // // public PersonasType getPersonas() { // return personas; // } // // public void setPersonas(PersonasType personas) { // this.personas = personas; // } // // public UserType getUser() { // return user; // } // // public void setUser(UserType user) { // this.user = user; // } // // } // // Path: src/main/java/br/com/soapboxrace/xmpp/IXmppSender.java // public interface IXmppSender { // // public void send(String msg, Long to); // // public void send(Object object, Long to); // // public void createUpdatePersona(Long id, String password); // // } // Path: src/main/java/br/com/soapboxrace/engine/User.java import br.com.soapboxrace.bo.UserBO; import br.com.soapboxrace.definition.ServerExceptions.EngineException; import br.com.soapboxrace.jaxb.UserInfoType; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.xmpp.IXmppSender; import br.com.soapboxrace.xmpp.XmppFactory; package br.com.soapboxrace.engine; public class User extends Router { private UserBO userBO = new UserBO(); public String getPermanentSession() throws EngineException { Long userId = Long.valueOf(getHeader("userId")); checkSecurityToken(); // first 16 token chars used to login xmpp server String tokenText = "1234567890123456" + shuffleString(getSecureRandomText());
UserInfoType userInfo = userBO.getPermanentSession(userId, tokenText);
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/engine/User.java
// Path: src/main/java/br/com/soapboxrace/jaxb/UserInfoType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "UserInfoType", propOrder = { "defaultPersonaIdx", "personas", "user" }) // @XmlRootElement(name = "UserInfo") // public class UserInfoType { // // protected int defaultPersonaIdx; // @XmlElement(required = true) // protected PersonasType personas; // @XmlElement(required = true) // protected UserType user; // // public int getDefaultPersonaIdx() { // return defaultPersonaIdx; // } // // public void setDefaultPersonaIdx(int defaultPersonaIdx) { // this.defaultPersonaIdx = defaultPersonaIdx; // } // // public PersonasType getPersonas() { // return personas; // } // // public void setPersonas(PersonasType personas) { // this.personas = personas; // } // // public UserType getUser() { // return user; // } // // public void setUser(UserType user) { // this.user = user; // } // // } // // Path: src/main/java/br/com/soapboxrace/xmpp/IXmppSender.java // public interface IXmppSender { // // public void send(String msg, Long to); // // public void send(Object object, Long to); // // public void createUpdatePersona(Long id, String password); // // }
import br.com.soapboxrace.bo.UserBO; import br.com.soapboxrace.definition.ServerExceptions.EngineException; import br.com.soapboxrace.jaxb.UserInfoType; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.xmpp.IXmppSender; import br.com.soapboxrace.xmpp.XmppFactory;
package br.com.soapboxrace.engine; public class User extends Router { private UserBO userBO = new UserBO(); public String getPermanentSession() throws EngineException { Long userId = Long.valueOf(getHeader("userId")); checkSecurityToken(); // first 16 token chars used to login xmpp server String tokenText = "1234567890123456" + shuffleString(getSecureRandomText()); UserInfoType userInfo = userBO.getPermanentSession(userId, tokenText); setSessionEntry("SecurityToken", tokenText); return MarshalXML.marshal(userInfo); } public String secureLogout() throws EngineException { checkSecurityToken(); removeSessionEntry(Long.valueOf(getParam("userId"))); return ""; } public String secureLoginPersona() throws EngineException { checkSecurityToken(); setSessionEntry("PersonaId", Long.valueOf(getParam("personaId")));
// Path: src/main/java/br/com/soapboxrace/jaxb/UserInfoType.java // @XmlAccessorType(XmlAccessType.FIELD) // @XmlType(name = "UserInfoType", propOrder = { "defaultPersonaIdx", "personas", "user" }) // @XmlRootElement(name = "UserInfo") // public class UserInfoType { // // protected int defaultPersonaIdx; // @XmlElement(required = true) // protected PersonasType personas; // @XmlElement(required = true) // protected UserType user; // // public int getDefaultPersonaIdx() { // return defaultPersonaIdx; // } // // public void setDefaultPersonaIdx(int defaultPersonaIdx) { // this.defaultPersonaIdx = defaultPersonaIdx; // } // // public PersonasType getPersonas() { // return personas; // } // // public void setPersonas(PersonasType personas) { // this.personas = personas; // } // // public UserType getUser() { // return user; // } // // public void setUser(UserType user) { // this.user = user; // } // // } // // Path: src/main/java/br/com/soapboxrace/xmpp/IXmppSender.java // public interface IXmppSender { // // public void send(String msg, Long to); // // public void send(Object object, Long to); // // public void createUpdatePersona(Long id, String password); // // } // Path: src/main/java/br/com/soapboxrace/engine/User.java import br.com.soapboxrace.bo.UserBO; import br.com.soapboxrace.definition.ServerExceptions.EngineException; import br.com.soapboxrace.jaxb.UserInfoType; import br.com.soapboxrace.jaxb.util.MarshalXML; import br.com.soapboxrace.xmpp.IXmppSender; import br.com.soapboxrace.xmpp.XmppFactory; package br.com.soapboxrace.engine; public class User extends Router { private UserBO userBO = new UserBO(); public String getPermanentSession() throws EngineException { Long userId = Long.valueOf(getHeader("userId")); checkSecurityToken(); // first 16 token chars used to login xmpp server String tokenText = "1234567890123456" + shuffleString(getSecureRandomText()); UserInfoType userInfo = userBO.getPermanentSession(userId, tokenText); setSessionEntry("SecurityToken", tokenText); return MarshalXML.marshal(userInfo); } public String secureLogout() throws EngineException { checkSecurityToken(); removeSessionEntry(Long.valueOf(getParam("userId"))); return ""; } public String secureLoginPersona() throws EngineException { checkSecurityToken(); setSessionEntry("PersonaId", Long.valueOf(getParam("personaId")));
IXmppSender xmppSenderInstance = XmppFactory.getXmppSenderInstance(Session.getXmppServerType());
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/dao/xml/BasketDefinitionDao.java
// Path: src/main/java/br/com/soapboxrace/jpa/BasketDefinitionEntity.java // @Entity // @Table(name = "BASKETDEFINITION") // public class BasketDefinitionEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = 5314835854384144787L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "id", nullable = false) // private Long id; // // public Long getId() { // return id; // } // // public void setId(Long id) { // this.id = id; // } // // @Column(name = "ProductId") // private String productId; // // @Convert(converter = OwnedCarTransConverter.class) // @Column(name = "OwnedCarTrans", length = 40000) // private OwnedCarTransType ownedCarTrans; // // public String getProductId() { // return productId; // } // // public void setProductId(String productId) { // this.productId = productId; // } // // public OwnedCarTransType getOwnedCarTrans() { // return ownedCarTrans; // } // // public void setOwnedCarTrans(OwnedCarTransType ownedCarTrans) { // this.ownedCarTrans = ownedCarTrans; // } // }
import java.util.List; import br.com.soapboxrace.dao.factory.IBasketDefinitionDao; import br.com.soapboxrace.jpa.BasketDefinitionEntity; import br.com.soapboxrace.jpa.ISoapBoxEntity;
package br.com.soapboxrace.dao.xml; public class BasketDefinitionDao extends SoapboxDao implements IBasketDefinitionDao { @Override
// Path: src/main/java/br/com/soapboxrace/jpa/BasketDefinitionEntity.java // @Entity // @Table(name = "BASKETDEFINITION") // public class BasketDefinitionEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = 5314835854384144787L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "id", nullable = false) // private Long id; // // public Long getId() { // return id; // } // // public void setId(Long id) { // this.id = id; // } // // @Column(name = "ProductId") // private String productId; // // @Convert(converter = OwnedCarTransConverter.class) // @Column(name = "OwnedCarTrans", length = 40000) // private OwnedCarTransType ownedCarTrans; // // public String getProductId() { // return productId; // } // // public void setProductId(String productId) { // this.productId = productId; // } // // public OwnedCarTransType getOwnedCarTrans() { // return ownedCarTrans; // } // // public void setOwnedCarTrans(OwnedCarTransType ownedCarTrans) { // this.ownedCarTrans = ownedCarTrans; // } // } // Path: src/main/java/br/com/soapboxrace/dao/xml/BasketDefinitionDao.java import java.util.List; import br.com.soapboxrace.dao.factory.IBasketDefinitionDao; import br.com.soapboxrace.jpa.BasketDefinitionEntity; import br.com.soapboxrace.jpa.ISoapBoxEntity; package br.com.soapboxrace.dao.xml; public class BasketDefinitionDao extends SoapboxDao implements IBasketDefinitionDao { @Override
public BasketDefinitionEntity findById(Long id) {
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/dao/db/BasketDefinitionDao.java
// Path: src/main/java/br/com/soapboxrace/jpa/BasketDefinitionEntity.java // @Entity // @Table(name = "BASKETDEFINITION") // public class BasketDefinitionEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = 5314835854384144787L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "id", nullable = false) // private Long id; // // public Long getId() { // return id; // } // // public void setId(Long id) { // this.id = id; // } // // @Column(name = "ProductId") // private String productId; // // @Convert(converter = OwnedCarTransConverter.class) // @Column(name = "OwnedCarTrans", length = 40000) // private OwnedCarTransType ownedCarTrans; // // public String getProductId() { // return productId; // } // // public void setProductId(String productId) { // this.productId = productId; // } // // public OwnedCarTransType getOwnedCarTrans() { // return ownedCarTrans; // } // // public void setOwnedCarTrans(OwnedCarTransType ownedCarTrans) { // this.ownedCarTrans = ownedCarTrans; // } // }
import java.util.List; import br.com.soapboxrace.dao.factory.IBasketDefinitionDao; import br.com.soapboxrace.db.SoapboxDao; import br.com.soapboxrace.jpa.BasketDefinitionEntity; import br.com.soapboxrace.jpa.ISoapBoxEntity;
package br.com.soapboxrace.dao.db; public class BasketDefinitionDao extends SoapboxDao implements IBasketDefinitionDao { @Override
// Path: src/main/java/br/com/soapboxrace/jpa/BasketDefinitionEntity.java // @Entity // @Table(name = "BASKETDEFINITION") // public class BasketDefinitionEntity implements ISoapBoxEntity { // // private static final long serialVersionUID = 5314835854384144787L; // // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Column(name = "id", nullable = false) // private Long id; // // public Long getId() { // return id; // } // // public void setId(Long id) { // this.id = id; // } // // @Column(name = "ProductId") // private String productId; // // @Convert(converter = OwnedCarTransConverter.class) // @Column(name = "OwnedCarTrans", length = 40000) // private OwnedCarTransType ownedCarTrans; // // public String getProductId() { // return productId; // } // // public void setProductId(String productId) { // this.productId = productId; // } // // public OwnedCarTransType getOwnedCarTrans() { // return ownedCarTrans; // } // // public void setOwnedCarTrans(OwnedCarTransType ownedCarTrans) { // this.ownedCarTrans = ownedCarTrans; // } // } // Path: src/main/java/br/com/soapboxrace/dao/db/BasketDefinitionDao.java import java.util.List; import br.com.soapboxrace.dao.factory.IBasketDefinitionDao; import br.com.soapboxrace.db.SoapboxDao; import br.com.soapboxrace.jpa.BasketDefinitionEntity; import br.com.soapboxrace.jpa.ISoapBoxEntity; package br.com.soapboxrace.dao.db; public class BasketDefinitionDao extends SoapboxDao implements IBasketDefinitionDao { @Override
public BasketDefinitionEntity findById(Long id) {
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/jaxb/CustomCarType.java
// Path: src/main/java/br/com/soapboxrace/jaxb/convert/PerformancePartsConverter.java // @Converter // public class PerformancePartsConverter implements AttributeConverter<PerformancePartsType, String> { // @Override // public String convertToDatabaseColumn(PerformancePartsType performanceParts) { // return MarshalXML.marshal(performanceParts); // } // // @Override // public PerformancePartsType convertToEntityAttribute(String performancePartsString) { // return (PerformancePartsType) UnmarshalXML.unMarshal(performancePartsString, new PerformancePartsType()); // } // } // // Path: src/main/java/br/com/soapboxrace/jaxb/convert/VisualPartsConverter.java // @Converter // public class VisualPartsConverter implements AttributeConverter<VisualPartsType, String> { // @Override // public String convertToDatabaseColumn(VisualPartsType visualParts) { // return MarshalXML.marshal(visualParts); // } // // @Override // public VisualPartsType convertToEntityAttribute(String visualPartsString) { // return (VisualPartsType) UnmarshalXML.unMarshal(visualPartsString, new VisualPartsType()); // } // }
import javax.persistence.Convert; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import br.com.soapboxrace.jaxb.convert.PaintsConverter; import br.com.soapboxrace.jaxb.convert.PerformancePartsConverter; import br.com.soapboxrace.jaxb.convert.SkillModPartsConverter; import br.com.soapboxrace.jaxb.convert.VinylsConverter; import br.com.soapboxrace.jaxb.convert.VisualPartsConverter;
package br.com.soapboxrace.jaxb; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CustomCarType", propOrder = { "baseCarId", "carClassHash", "isPreset", "level", "name", "apiId", "paints", "performanceParts", "physicsProfileHash", "rating", "resalePrice", "skillModParts", "skillModSlotCount", "vinyls", "visualParts" }) @XmlRootElement(name = "CustomCar") public class CustomCarType { @XmlElement(name = "BaseCar", required = true) protected long baseCarId; @XmlElement(name = "CarClassHash") protected int carClassHash; @XmlElement(name = "IsPreset") protected boolean isPreset; @XmlElement(name = "Level") protected int level; @XmlElement(name = "Name") protected String name; @XmlElement(name = "Id", required = true) protected long apiId; @Convert(converter = PaintsConverter.class) @XmlElement(name = "Paints") protected PaintsType paints;
// Path: src/main/java/br/com/soapboxrace/jaxb/convert/PerformancePartsConverter.java // @Converter // public class PerformancePartsConverter implements AttributeConverter<PerformancePartsType, String> { // @Override // public String convertToDatabaseColumn(PerformancePartsType performanceParts) { // return MarshalXML.marshal(performanceParts); // } // // @Override // public PerformancePartsType convertToEntityAttribute(String performancePartsString) { // return (PerformancePartsType) UnmarshalXML.unMarshal(performancePartsString, new PerformancePartsType()); // } // } // // Path: src/main/java/br/com/soapboxrace/jaxb/convert/VisualPartsConverter.java // @Converter // public class VisualPartsConverter implements AttributeConverter<VisualPartsType, String> { // @Override // public String convertToDatabaseColumn(VisualPartsType visualParts) { // return MarshalXML.marshal(visualParts); // } // // @Override // public VisualPartsType convertToEntityAttribute(String visualPartsString) { // return (VisualPartsType) UnmarshalXML.unMarshal(visualPartsString, new VisualPartsType()); // } // } // Path: src/main/java/br/com/soapboxrace/jaxb/CustomCarType.java import javax.persistence.Convert; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import br.com.soapboxrace.jaxb.convert.PaintsConverter; import br.com.soapboxrace.jaxb.convert.PerformancePartsConverter; import br.com.soapboxrace.jaxb.convert.SkillModPartsConverter; import br.com.soapboxrace.jaxb.convert.VinylsConverter; import br.com.soapboxrace.jaxb.convert.VisualPartsConverter; package br.com.soapboxrace.jaxb; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CustomCarType", propOrder = { "baseCarId", "carClassHash", "isPreset", "level", "name", "apiId", "paints", "performanceParts", "physicsProfileHash", "rating", "resalePrice", "skillModParts", "skillModSlotCount", "vinyls", "visualParts" }) @XmlRootElement(name = "CustomCar") public class CustomCarType { @XmlElement(name = "BaseCar", required = true) protected long baseCarId; @XmlElement(name = "CarClassHash") protected int carClassHash; @XmlElement(name = "IsPreset") protected boolean isPreset; @XmlElement(name = "Level") protected int level; @XmlElement(name = "Name") protected String name; @XmlElement(name = "Id", required = true) protected long apiId; @Convert(converter = PaintsConverter.class) @XmlElement(name = "Paints") protected PaintsType paints;
@Convert(converter = PerformancePartsConverter.class)
nilzao/soapbox-race
src/main/java/br/com/soapboxrace/jaxb/CustomCarType.java
// Path: src/main/java/br/com/soapboxrace/jaxb/convert/PerformancePartsConverter.java // @Converter // public class PerformancePartsConverter implements AttributeConverter<PerformancePartsType, String> { // @Override // public String convertToDatabaseColumn(PerformancePartsType performanceParts) { // return MarshalXML.marshal(performanceParts); // } // // @Override // public PerformancePartsType convertToEntityAttribute(String performancePartsString) { // return (PerformancePartsType) UnmarshalXML.unMarshal(performancePartsString, new PerformancePartsType()); // } // } // // Path: src/main/java/br/com/soapboxrace/jaxb/convert/VisualPartsConverter.java // @Converter // public class VisualPartsConverter implements AttributeConverter<VisualPartsType, String> { // @Override // public String convertToDatabaseColumn(VisualPartsType visualParts) { // return MarshalXML.marshal(visualParts); // } // // @Override // public VisualPartsType convertToEntityAttribute(String visualPartsString) { // return (VisualPartsType) UnmarshalXML.unMarshal(visualPartsString, new VisualPartsType()); // } // }
import javax.persistence.Convert; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import br.com.soapboxrace.jaxb.convert.PaintsConverter; import br.com.soapboxrace.jaxb.convert.PerformancePartsConverter; import br.com.soapboxrace.jaxb.convert.SkillModPartsConverter; import br.com.soapboxrace.jaxb.convert.VinylsConverter; import br.com.soapboxrace.jaxb.convert.VisualPartsConverter;
@XmlElement(name = "CarClassHash") protected int carClassHash; @XmlElement(name = "IsPreset") protected boolean isPreset; @XmlElement(name = "Level") protected int level; @XmlElement(name = "Name") protected String name; @XmlElement(name = "Id", required = true) protected long apiId; @Convert(converter = PaintsConverter.class) @XmlElement(name = "Paints") protected PaintsType paints; @Convert(converter = PerformancePartsConverter.class) @XmlElement(name = "PerformanceParts") protected PerformancePartsType performanceParts; @XmlElement(name = "PhysicsProfileHash") protected long physicsProfileHash; @XmlElement(name = "Rating") protected int rating; @XmlElement(name = "ResalePrice") protected int resalePrice; @Convert(converter = SkillModPartsConverter.class) @XmlElement(name = "SkillModParts") protected SkillModPartsType skillModParts; @XmlElement(name = "SkillModSlotCount") protected Short skillModSlotCount; @Convert(converter = VinylsConverter.class) @XmlElement(name = "Vinyls") protected VinylsType vinyls;
// Path: src/main/java/br/com/soapboxrace/jaxb/convert/PerformancePartsConverter.java // @Converter // public class PerformancePartsConverter implements AttributeConverter<PerformancePartsType, String> { // @Override // public String convertToDatabaseColumn(PerformancePartsType performanceParts) { // return MarshalXML.marshal(performanceParts); // } // // @Override // public PerformancePartsType convertToEntityAttribute(String performancePartsString) { // return (PerformancePartsType) UnmarshalXML.unMarshal(performancePartsString, new PerformancePartsType()); // } // } // // Path: src/main/java/br/com/soapboxrace/jaxb/convert/VisualPartsConverter.java // @Converter // public class VisualPartsConverter implements AttributeConverter<VisualPartsType, String> { // @Override // public String convertToDatabaseColumn(VisualPartsType visualParts) { // return MarshalXML.marshal(visualParts); // } // // @Override // public VisualPartsType convertToEntityAttribute(String visualPartsString) { // return (VisualPartsType) UnmarshalXML.unMarshal(visualPartsString, new VisualPartsType()); // } // } // Path: src/main/java/br/com/soapboxrace/jaxb/CustomCarType.java import javax.persistence.Convert; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import br.com.soapboxrace.jaxb.convert.PaintsConverter; import br.com.soapboxrace.jaxb.convert.PerformancePartsConverter; import br.com.soapboxrace.jaxb.convert.SkillModPartsConverter; import br.com.soapboxrace.jaxb.convert.VinylsConverter; import br.com.soapboxrace.jaxb.convert.VisualPartsConverter; @XmlElement(name = "CarClassHash") protected int carClassHash; @XmlElement(name = "IsPreset") protected boolean isPreset; @XmlElement(name = "Level") protected int level; @XmlElement(name = "Name") protected String name; @XmlElement(name = "Id", required = true) protected long apiId; @Convert(converter = PaintsConverter.class) @XmlElement(name = "Paints") protected PaintsType paints; @Convert(converter = PerformancePartsConverter.class) @XmlElement(name = "PerformanceParts") protected PerformancePartsType performanceParts; @XmlElement(name = "PhysicsProfileHash") protected long physicsProfileHash; @XmlElement(name = "Rating") protected int rating; @XmlElement(name = "ResalePrice") protected int resalePrice; @Convert(converter = SkillModPartsConverter.class) @XmlElement(name = "SkillModParts") protected SkillModPartsType skillModParts; @XmlElement(name = "SkillModSlotCount") protected Short skillModSlotCount; @Convert(converter = VinylsConverter.class) @XmlElement(name = "Vinyls") protected VinylsType vinyls;
@Convert(converter = VisualPartsConverter.class)
poqudrof/PapAR
src/fr/inria/papart/apps/PaperApp2D.java
// Path: src/fr/inria/papart/apps/MyApp2D.java // public class MyApp2D extends PaperScreen { // // public MyApp2D(){ // super(); // } // // protected void setup() { // setDrawingSize(297, 210); // // loadMarkerBoard(Papart.markerFolder + "big.cfg", 297, 210); // loadMarkerBoard(Papart.markerFolder + "dlink.png", 140,140); // } // // public void draw() { // // this.getLocation().print(); // beginDraw2D(); // background(100, 0, 0); // fill(200, 100, 20); // rect(10, 10, 100, 30); // endDraw(); // } // }
import fr.inria.papart.procam.*; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.opencv_core; import org.reflections.*; import fr.inria.papart.apps.MyApp2D; import processing.core.PApplet; import toxi.geom.*; import processing.video.*;
/* * Copyright Inria and Bordeaux University. * Author Jeremy Laviole. jeremy.laviole@inria.fr * PapAR project is the open-source version of the * PapARt project. License is LGPLv3, distributed with the sources. * This project can also distributed with standard commercial * licence for closed-sources projects. */ package fr.inria.papart.apps; public class PaperApp2D extends PApplet { boolean useProjector = false; Papart papart; public static void main(String args[]) { PApplet.main(new String[]{"--present", "fr.inria.papart.apps.PaperApp2D"}); } public void setup() { papart = Papart.seeThrough(this); // // papart.loadSketches();
// Path: src/fr/inria/papart/apps/MyApp2D.java // public class MyApp2D extends PaperScreen { // // public MyApp2D(){ // super(); // } // // protected void setup() { // setDrawingSize(297, 210); // // loadMarkerBoard(Papart.markerFolder + "big.cfg", 297, 210); // loadMarkerBoard(Papart.markerFolder + "dlink.png", 140,140); // } // // public void draw() { // // this.getLocation().print(); // beginDraw2D(); // background(100, 0, 0); // fill(200, 100, 20); // rect(10, 10, 100, 30); // endDraw(); // } // } // Path: src/fr/inria/papart/apps/PaperApp2D.java import fr.inria.papart.procam.*; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.opencv_core; import org.reflections.*; import fr.inria.papart.apps.MyApp2D; import processing.core.PApplet; import toxi.geom.*; import processing.video.*; /* * Copyright Inria and Bordeaux University. * Author Jeremy Laviole. jeremy.laviole@inria.fr * PapAR project is the open-source version of the * PapARt project. License is LGPLv3, distributed with the sources. * This project can also distributed with standard commercial * licence for closed-sources projects. */ package fr.inria.papart.apps; public class PaperApp2D extends PApplet { boolean useProjector = false; Papart papart; public static void main(String args[]) { PApplet.main(new String[]{"--present", "fr.inria.papart.apps.PaperApp2D"}); } public void setup() { papart = Papart.seeThrough(this); // // papart.loadSketches();
MyApp2D app = new MyApp2D();
MottoX/TAOMP
src/main/java/com/github/mottox/taomp/concurrent/locks/LockTwo.java
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // }
import com.github.mottox.taomp.common.ThreadID;
package com.github.mottox.taomp.concurrent.locks; /** * LockTwo算法。 * LockTwo算法满足互斥性,至多只有一个线程可以进入临界区。 * LockTwo算法中有个非常有意思的变量--victim,即所谓的牺牲者。作为牺牲者的线程是无法进入临界区的,除非牺牲者变量变为其他线程。 * LockTwo的缺陷在于在无竞争环境下,一个线程在试图进入临界区时会陷入无限等待。 */ public class LockTwo implements SimpleLock { private volatile int victim; @Override public void lock() {
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // } // Path: src/main/java/com/github/mottox/taomp/concurrent/locks/LockTwo.java import com.github.mottox.taomp.common.ThreadID; package com.github.mottox.taomp.concurrent.locks; /** * LockTwo算法。 * LockTwo算法满足互斥性,至多只有一个线程可以进入临界区。 * LockTwo算法中有个非常有意思的变量--victim,即所谓的牺牲者。作为牺牲者的线程是无法进入临界区的,除非牺牲者变量变为其他线程。 * LockTwo的缺陷在于在无竞争环境下,一个线程在试图进入临界区时会陷入无限等待。 */ public class LockTwo implements SimpleLock { private volatile int victim; @Override public void lock() {
int i = ThreadID.get();
MottoX/TAOMP
src/main/java/com/github/mottox/taomp/concurrent/locks/SimpleReentrantLock.java
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // }
import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import com.github.mottox.taomp.common.ThreadID;
package com.github.mottox.taomp.concurrent.locks; /** * 简单的可重入锁。 */ public class SimpleReentrantLock implements SimpleLock { private Lock lock; private Condition condition; private volatile int owner; private volatile int holdCount; public SimpleReentrantLock() { // 只是借用java.util.concurrent.ReentrantLock来实现互斥。 this.lock = new ReentrantLock(); this.condition = lock.newCondition(); this.owner = -1; this.holdCount = 0; } @Override public void lock() {
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // } // Path: src/main/java/com/github/mottox/taomp/concurrent/locks/SimpleReentrantLock.java import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import com.github.mottox.taomp.common.ThreadID; package com.github.mottox.taomp.concurrent.locks; /** * 简单的可重入锁。 */ public class SimpleReentrantLock implements SimpleLock { private Lock lock; private Condition condition; private volatile int owner; private volatile int holdCount; public SimpleReentrantLock() { // 只是借用java.util.concurrent.ReentrantLock来实现互斥。 this.lock = new ReentrantLock(); this.condition = lock.newCondition(); this.owner = -1; this.holdCount = 0; } @Override public void lock() {
int me = ThreadID.get();
MottoX/TAOMP
src/main/java/com/github/mottox/taomp/common/LockCounter.java
// Path: src/main/java/com/github/mottox/taomp/concurrent/locks/SimpleLock.java // public interface SimpleLock extends Lock { // // /** // * 在进入临界区之前调用。 // */ // void lock(); // // /** // * 在离开临界区之前调用。 // */ // void unlock(); // // @Override // default void lockInterruptibly() throws InterruptedException { // throw new UnsupportedOperationException(); // } // // @Override // default boolean tryLock() { // throw new UnsupportedOperationException(); // } // // @Override // default boolean tryLock(long time, TimeUnit unit) throws InterruptedException { // throw new UnsupportedOperationException(); // } // // @Override // default Condition newCondition() { // throw new UnsupportedOperationException(); // } // }
import com.github.mottox.taomp.concurrent.locks.SimpleLock;
package com.github.mottox.taomp.common; /** * 基于{@link SimpleLock}实现互斥的计数器。 * * @author Robin Wang */ public class LockCounter { private long value;
// Path: src/main/java/com/github/mottox/taomp/concurrent/locks/SimpleLock.java // public interface SimpleLock extends Lock { // // /** // * 在进入临界区之前调用。 // */ // void lock(); // // /** // * 在离开临界区之前调用。 // */ // void unlock(); // // @Override // default void lockInterruptibly() throws InterruptedException { // throw new UnsupportedOperationException(); // } // // @Override // default boolean tryLock() { // throw new UnsupportedOperationException(); // } // // @Override // default boolean tryLock(long time, TimeUnit unit) throws InterruptedException { // throw new UnsupportedOperationException(); // } // // @Override // default Condition newCondition() { // throw new UnsupportedOperationException(); // } // } // Path: src/main/java/com/github/mottox/taomp/common/LockCounter.java import com.github.mottox.taomp.concurrent.locks.SimpleLock; package com.github.mottox.taomp.common; /** * 基于{@link SimpleLock}实现互斥的计数器。 * * @author Robin Wang */ public class LockCounter { private long value;
private SimpleLock lock;
MottoX/TAOMP
src/test/java/com/github/mottox/taomp/concurrent/locks/PetersonTest.java
// Path: src/main/java/com/github/mottox/taomp/common/LockCounter.java // public class LockCounter { // private long value; // private SimpleLock lock; // // public LockCounter(SimpleLock lock) { // this.lock = lock; // } // // public long get() { // // 不想用锁,只是为了暴露取值API。 // return value; // } // // public long getAndIncrement() { // lock.lock(); // try { // long temp = value; // value = temp + 1; // return temp; // } finally { // lock.unlock(); // } // } // }
import org.junit.Assert; import org.junit.Test; import com.github.mottox.taomp.common.LockCounter;
package com.github.mottox.taomp.concurrent.locks; /** * {@link Peterson}测试类。 * * @author Robin Wang */ public class PetersonTest { @Test(timeout = 10000) public void testLockAndUnlock() throws Exception {
// Path: src/main/java/com/github/mottox/taomp/common/LockCounter.java // public class LockCounter { // private long value; // private SimpleLock lock; // // public LockCounter(SimpleLock lock) { // this.lock = lock; // } // // public long get() { // // 不想用锁,只是为了暴露取值API。 // return value; // } // // public long getAndIncrement() { // lock.lock(); // try { // long temp = value; // value = temp + 1; // return temp; // } finally { // lock.unlock(); // } // } // } // Path: src/test/java/com/github/mottox/taomp/concurrent/locks/PetersonTest.java import org.junit.Assert; import org.junit.Test; import com.github.mottox.taomp.common.LockCounter; package com.github.mottox.taomp.concurrent.locks; /** * {@link Peterson}测试类。 * * @author Robin Wang */ public class PetersonTest { @Test(timeout = 10000) public void testLockAndUnlock() throws Exception {
LockCounter counter = new LockCounter(new Peterson());
MottoX/TAOMP
src/main/java/com/github/mottox/taomp/concurrent/locks/BackoffLock.java
// Path: src/main/java/com/github/mottox/taomp/common/Backoff.java // public class Backoff { // // private final int minDelay; // // private final int maxDelay; // // private final Random random; // // private int limit; // // public Backoff(int minDelay, int maxDelay) { // this.minDelay = minDelay; // this.maxDelay = maxDelay; // this.limit = minDelay; // this.random = new Random(); // } // // public void backoff() throws InterruptedException { // int delay = random.nextInt(limit); // limit = Math.min(maxDelay, 2 * limit); // Thread.sleep(delay); // } // }
import java.util.concurrent.atomic.AtomicBoolean; import com.github.mottox.taomp.common.Backoff;
package com.github.mottox.taomp.concurrent.locks; /** * 使用了{@link com.github.mottox.taomp.common.Backoff}的锁。 */ public class BackoffLock implements SimpleLock { private AtomicBoolean state = new AtomicBoolean(false); private static final int MIN_DELAY = 50; private static final int MAX_DELAY = 80; @Override public void lock() {
// Path: src/main/java/com/github/mottox/taomp/common/Backoff.java // public class Backoff { // // private final int minDelay; // // private final int maxDelay; // // private final Random random; // // private int limit; // // public Backoff(int minDelay, int maxDelay) { // this.minDelay = minDelay; // this.maxDelay = maxDelay; // this.limit = minDelay; // this.random = new Random(); // } // // public void backoff() throws InterruptedException { // int delay = random.nextInt(limit); // limit = Math.min(maxDelay, 2 * limit); // Thread.sleep(delay); // } // } // Path: src/main/java/com/github/mottox/taomp/concurrent/locks/BackoffLock.java import java.util.concurrent.atomic.AtomicBoolean; import com.github.mottox.taomp.common.Backoff; package com.github.mottox.taomp.concurrent.locks; /** * 使用了{@link com.github.mottox.taomp.common.Backoff}的锁。 */ public class BackoffLock implements SimpleLock { private AtomicBoolean state = new AtomicBoolean(false); private static final int MIN_DELAY = 50; private static final int MAX_DELAY = 80; @Override public void lock() {
Backoff backoff = new Backoff(MIN_DELAY, MAX_DELAY);
MottoX/TAOMP
src/main/java/com/github/mottox/taomp/concurrent/locks/Peterson.java
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // }
import java.util.concurrent.atomic.AtomicBoolean; import com.github.mottox.taomp.common.ThreadID;
package com.github.mottox.taomp.concurrent.locks; /** * Peterson锁,一种{@link LockOne}和{@link LockTwo}结合起来的无饥饿锁算法。 * 在TAOMP中将其称为最简洁与最完美的双线程互斥算法,以其发明者名字命名。 */ public class Peterson implements SimpleLock { private AtomicBoolean[] flag = new AtomicBoolean[2]; private volatile int victim; public Peterson() { flag[0] = new AtomicBoolean(false); flag[1] = new AtomicBoolean(false); } @Override public void lock() {
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // } // Path: src/main/java/com/github/mottox/taomp/concurrent/locks/Peterson.java import java.util.concurrent.atomic.AtomicBoolean; import com.github.mottox.taomp.common.ThreadID; package com.github.mottox.taomp.concurrent.locks; /** * Peterson锁,一种{@link LockOne}和{@link LockTwo}结合起来的无饥饿锁算法。 * 在TAOMP中将其称为最简洁与最完美的双线程互斥算法,以其发明者名字命名。 */ public class Peterson implements SimpleLock { private AtomicBoolean[] flag = new AtomicBoolean[2]; private volatile int victim; public Peterson() { flag[0] = new AtomicBoolean(false); flag[1] = new AtomicBoolean(false); } @Override public void lock() {
int i = ThreadID.get();
MottoX/TAOMP
src/main/java/com/github/mottox/taomp/concurrent/locks/LockOne.java
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // }
import java.util.concurrent.atomic.AtomicBoolean; import com.github.mottox.taomp.common.ThreadID;
package com.github.mottox.taomp.concurrent.locks; /** * LockOne算法。 * LockOne算法满足互斥性,至多只有一个线程可以进入临界区。 * LockOne的缺陷在于当两个线程同时完成置flag为true操作,等待另一个线程的flag为false时,将发生死锁。 */ public class LockOne implements SimpleLock { private AtomicBoolean[] flag = new AtomicBoolean[2]; public LockOne() { flag[0] = new AtomicBoolean(false); flag[1] = new AtomicBoolean(false); } @Override public void lock() {
// Path: src/main/java/com/github/mottox/taomp/common/ThreadID.java // public class ThreadID { // // private static Map<Long, Integer> threadIDs = new ConcurrentHashMap<>(); // // private static AtomicInteger counter = new AtomicInteger(); // // public static int get() { // long id = Thread.currentThread().getId(); // return threadIDs.computeIfAbsent(id, key -> counter.getAndIncrement()); // } // } // Path: src/main/java/com/github/mottox/taomp/concurrent/locks/LockOne.java import java.util.concurrent.atomic.AtomicBoolean; import com.github.mottox.taomp.common.ThreadID; package com.github.mottox.taomp.concurrent.locks; /** * LockOne算法。 * LockOne算法满足互斥性,至多只有一个线程可以进入临界区。 * LockOne的缺陷在于当两个线程同时完成置flag为true操作,等待另一个线程的flag为false时,将发生死锁。 */ public class LockOne implements SimpleLock { private AtomicBoolean[] flag = new AtomicBoolean[2]; public LockOne() { flag[0] = new AtomicBoolean(false); flag[1] = new AtomicBoolean(false); } @Override public void lock() {
int i = ThreadID.get();
MottoX/TAOMP
src/test/java/com/github/mottox/taomp/concurrent/locks/LockTestHelper.java
// Path: src/main/java/com/github/mottox/taomp/common/LockCounter.java // public class LockCounter { // private long value; // private SimpleLock lock; // // public LockCounter(SimpleLock lock) { // this.lock = lock; // } // // public long get() { // // 不想用锁,只是为了暴露取值API。 // return value; // } // // public long getAndIncrement() { // lock.lock(); // try { // long temp = value; // value = temp + 1; // return temp; // } finally { // lock.unlock(); // } // } // }
import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.Assert; import com.github.mottox.taomp.common.LockCounter;
package com.github.mottox.taomp.concurrent.locks; /** * {@link SimpleLock}测试辅助工具类。 * * @author Robin Wang */ public class LockTestHelper { public static void testLockAndUnlock(SimpleLock lock) throws Exception { // test single thread testLockAndUnlock(lock, 1); // test multiple threads testLockAndUnlock(lock, 4); } public static void testLockAndUnlock(SimpleLock lock, int thread) throws Exception { testLockAndUnlock(lock, thread, 500000); } public static void testLockAndUnlock(SimpleLock lock, int thread, int iteration) throws Exception {
// Path: src/main/java/com/github/mottox/taomp/common/LockCounter.java // public class LockCounter { // private long value; // private SimpleLock lock; // // public LockCounter(SimpleLock lock) { // this.lock = lock; // } // // public long get() { // // 不想用锁,只是为了暴露取值API。 // return value; // } // // public long getAndIncrement() { // lock.lock(); // try { // long temp = value; // value = temp + 1; // return temp; // } finally { // lock.unlock(); // } // } // } // Path: src/test/java/com/github/mottox/taomp/concurrent/locks/LockTestHelper.java import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.Assert; import com.github.mottox.taomp.common.LockCounter; package com.github.mottox.taomp.concurrent.locks; /** * {@link SimpleLock}测试辅助工具类。 * * @author Robin Wang */ public class LockTestHelper { public static void testLockAndUnlock(SimpleLock lock) throws Exception { // test single thread testLockAndUnlock(lock, 1); // test multiple threads testLockAndUnlock(lock, 4); } public static void testLockAndUnlock(SimpleLock lock, int thread) throws Exception { testLockAndUnlock(lock, thread, 500000); } public static void testLockAndUnlock(SimpleLock lock, int thread, int iteration) throws Exception {
LockCounter lockCounter = new LockCounter(lock);