rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return null; }
step.setEntry(entry); step.setStepId(stepId); step.setOwner(owner); step.setStartDate(startDate); step.setDueDate(dueDate); step.setStatus(status);
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
step.setEntry(entry); step.setStepId(stepId); step.setOwner(owner); step.setStartDate(startDate); step.setDueDate(dueDate); step.setStatus(status);
List stepIdList = new ArrayList(previousIds.length);
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
List stepIdList = new ArrayList(previousIds.length);
for (int i = 0; i < previousIds.length; i++) { long previousId = previousIds[i]; stepIdList.add(new Long(previousId)); }
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
for (int i = 0; i < previousIds.length; i++) { long previousId = previousIds[i]; stepIdList.add(new Long(previousId)); }
if (!stepIdList.isEmpty()) { String stepIds = TextUtils.join(", ", stepIdList);
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
if (!stepIdList.isEmpty()) { String stepIds = TextUtils.join(", ", stepIdList);
try { step.setPreviousSteps(session.find("FROM step in CLASS " + HibernateCurrentStep.class.getName() + " WHERE step.id IN (" + stepIds + ")")); } catch (HibernateException he) { log.error("Looking for step in " + stepIds, he); throw new StoreException("Looking for step in " + stepIds, he); } } else { step.setPreviousS...
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
try { step.setPreviousSteps(session.find("FROM step in CLASS " + HibernateCurrentStep.class.getName() + " WHERE step.id IN (" + stepIds + ")")); } catch (HibernateException e) { log.error("An exception occured", e); } } else { step.setPreviousSteps(Collections.EMPTY_LIST); }
if (entry.getCurrentSteps() == null) { ArrayList cSteps = new ArrayList(1); cSteps.add(step); entry.setCurrentSteps(cSteps); } else { entry.getCurrentSteps().add(step); }
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
if (entry.getCurrentSteps() == null) { ArrayList cSteps = new ArrayList(1); cSteps.add(step); entry.setCurrentSteps(cSteps); } else { entry.getCurrentSteps().add(step); }
try { session.save(entry); tx.commit();
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
try { session.save(entry); return step; } catch (HibernateException e) { log.error("An exception occured", e); return null; } }
return step; } catch (HibernateException he) { log.error("Saving new workflow entry", he); throw new StoreException("Saving new workflow entry", he); } }
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent...
public WorkflowEntry createEntry(String workflowName) {
public WorkflowEntry createEntry(String workflowName) throws StoreException {
public WorkflowEntry createEntry(String workflowName) { HibernateWorkflowEntry entry = new HibernateWorkflowEntry(); entry.setState(WorkflowEntry.CREATED); entry.setWorkflowName(workflowName); try { session.save(entry); } catch (HibernateException e) { log.er...
try { session.save(entry); } catch (HibernateException e) { log.error("An exception occured", e);
public WorkflowEntry createEntry(String workflowName) { HibernateWorkflowEntry entry = new HibernateWorkflowEntry(); entry.setState(WorkflowEntry.CREATED); entry.setWorkflowName(workflowName); try { session.save(entry); } catch (HibernateException e) { log.er...
public List findCurrentSteps(long entryId) {
public List findCurrentSteps(long entryId) throws StoreException {
public List findCurrentSteps(long entryId) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateExcepti...
try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException e) { log.error("An exception occured", e);
try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException he) { log.error("Looking for entryId " + entryId, he); throw new StoreException("Looking for entryId " + ent...
public List findCurrentSteps(long entryId) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateExcepti...
return null; } try { return session.find("FROM step IN CLASS " + HibernateCurrentStep.class.getName() + " WHERE step.entry = ?", entry, Hibernate.association(entry.getClass())); } catch (HibernateException e) { log.error("An exception occured", e); return Collections.EMPTY_LIST; }
public List findCurrentSteps(long entryId) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateExcepti...
public WorkflowEntry findEntry(long entryId) { try { List result = session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG); return (WorkflowEntry) result.get(0); } catch (HibernateException e) { log.error("An exception occured", e); retu...
public WorkflowEntry findEntry(long entryId) throws StoreException { try { List result = session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG); return (WorkflowEntry) result.get(0); } catch (HibernateException he) { log.error("Looking f...
public WorkflowEntry findEntry(long entryId) { try { List result = session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG); return (WorkflowEntry) result.get(0); } catch (HibernateException e) { ...
public List findHistorySteps(long entryId) { HibernateWorkflowEntry entry;
public List findHistorySteps(long entryId) throws StoreException { HibernateWorkflowEntry entry;
public List findHistorySteps(long entryId) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateExcepti...
try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException e) { log.error("An exception occured", e);
try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException he) { log.error("Finding entry " + entryId, he); throw new StoreException("Finding entry " + entryId, he); }
public List findHistorySteps(long entryId) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateExcepti...
return null; } try { return session.find("FROM step IN CLASS " + HibernateHistoryStep.class.getName() + " WHERE step.entry = ?", entry, Hibernate.association(entry.getClass())); } catch (HibernateException e) { log.error("An exception occured", e); return Collections.EMPTY_LIST; } }
try { return session.find("FROM step IN CLASS " + HibernateHistoryStep.class.getName() + " WHERE step.entry = ?", entry, Hibernate.association(entry.getClass())); } catch (HibernateException he) { log.error("Looking for step with entry " + entry, he); throw new StoreException("Looking for step with entry " + entry, he)...
public List findHistorySteps(long entryId) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateExcepti...
args.put("entryName", "OSWorkflowEntry"); args.put("entryId", new Long(entryId)); args.put("session", session);
args.put("entityName", "OSWorkflowEntry"); args.put("entityId", new Long(entryId)); DefaultHibernateConfigurationProvider configurationProvider = new DefaultHibernateConfigurationProvider(); configurationProvider.setSessionFactory(sessionFactory);
public PropertySet getPropertySet(long entryId) { HashMap args = new HashMap(); args.put("entryName", "OSWorkflowEntry"); args.put("entryId", new Long(entryId)); args.put("session", session); return PropertySetManager.getInstance("hibernate", args); }
args.put("configurationProvider", configurationProvider);
public PropertySet getPropertySet(long entryId) { HashMap args = new HashMap(); args.put("entryName", "OSWorkflowEntry"); args.put("entryId", new Long(entryId)); args.put("session", session); return PropertySetManager.getInstance("hibernate", args); }
public void init(Map props) {
public void init(Map props) throws StoreException { try { sessionFactory =(SessionFactory) props.get("sessionFactory"); session = sessionFactory.openSession(); } catch (HibernateException he) { log.error("Setting sessionFactory", he); throw new StoreException("Setting sessionFactory", he); }
public void init(Map props) { }
public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) { HibernateCurrentStep currentStep = (HibernateCurrentStep) step;
public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) throws StoreException { HibernateCurrentStep currentStep = (HibernateCurrentStep) step;
public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) { HibernateCurrentStep currentStep = (HibernateCurrentStep) step; currentStep.setActionId(actionId); currentStep.setFinishDate(finishDate); currentStep.setStatus(status); currentStep.s...
try { session.save(currentStep);
try { Transaction tx = session.beginTransaction(); session.save(currentStep); tx.commit();
public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) { HibernateCurrentStep currentStep = (HibernateCurrentStep) step; currentStep.setActionId(actionId); currentStep.setFinishDate(finishDate); currentStep.setStatus(status); currentStep.s...
return currentStep; } catch (HibernateException e) { log.error("An exception occured", e); return null; }
return currentStep; } catch (HibernateException he) { log.error("Saving current step with action " + actionId, he); throw new StoreException("Saving current step with action " + actionId, he); }
public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) { HibernateCurrentStep currentStep = (HibernateCurrentStep) step; currentStep.setActionId(actionId); currentStep.setFinishDate(finishDate); currentStep.setStatus(status); currentStep.s...
public void moveToHistory(Step step) { HibernateWorkflowEntry entry;
public void moveToHistory(Step step) throws StoreException { HibernateWorkflowEntry entry;
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateException e) { log.error("An exception occured", e);
Transaction tx; try { tx = session.beginTransaction(); entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateException he) { log.error("Looking for workflow entry " + s...
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
return; }
HibernateHistoryStep hStep = new HibernateHistoryStep((HibernateStep) step);
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
HibernateHistoryStep hStep = new HibernateHistoryStep((HibernateStep) step);
entry.getCurrentSteps().remove(step);
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
entry.getCurrentSteps().remove(step);
if (entry.getHistorySteps() == null) { ArrayList hSteps = new ArrayList(1); hSteps.add(hStep); entry.setHistorySteps(hSteps); } else { entry.getHistorySteps().add(hStep); }
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
if (entry.getHistorySteps() == null) { ArrayList hSteps = new ArrayList(1); hSteps.add(hStep); entry.setHistorySteps(hSteps); } else { entry.getHistorySteps().add(hStep); }
try { session.save(entry); tx.commit();
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
try { session.save(entry); } catch (HibernateException e) { log.error("An exception occured", e); } }
} catch (HibernateException he) { log.error("Saving workflow entry " + entry.getId(), he); throw new StoreException("Saving workflow entry " + entry.getId(), he); } }
public void moveToHistory(Step step) { HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM entry IN CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(step.getEntryId()), Hibernate.LONG).get(0); } catch (HibernateExc...
public List query(WorkflowQuery query) { return null; }
public List query(WorkflowQuery query) throws StoreException { List results = new ArrayList(); String sel; Class entityClass; int qtype = query.getType(); if (qtype == 0) { if (query.getLeft() != null) { qtype = query.getLeft().getType(); } } if (qtype == WorkflowQuery.CURRENT) { entityClass = HibernateCurrentSt...
public List query(WorkflowQuery query) { return null; }
public HibernateHistoryStep(HibernateStep step) { super(step);
public HibernateHistoryStep() {
public HibernateHistoryStep(HibernateStep step) { super(step); }
if (passesConditions(null, conditionalResult.getConditions(), unmodifiableTransients, ps, step.getStepId())) {
if (passesConditions(null, conditionalResult.getConditions(), unmodifiableTransients, ps, (step != null) ? step.getStepId() : (-1))) {
private boolean transitionWorkflow(WorkflowEntry entry, List currentSteps, WorkflowStore store, WorkflowDescriptor wf, ActionDescriptor action, Map transientVars, Map inputs, PropertySet ps) throws WorkflowException { Step step = getCurrentStep(wf, action.getId(), currentSteps, transientVars, ps); // ...
return lineHeight(context, style);
return lineHeight(context);
public static int fontXHeightForElement(Context context, CalculatedStyle style) { return lineHeight(context, style); }
return getFont(c, style);
Font f = c.getGraphics().getFont(); if (quick) { return f; } float size = style.propertyByName(CSSName.FONT_SIZE).computedValue().asFloat(); String weight = style.propertyByName(CSSName.FONT_WEIGHT).computedValue().asString(); String[] families = style.propertyByName(CSSName.FONT_FAMILY).computedValue().asStringArray...
public static Font getFont(Context c) { CalculatedStyle style = c.getCurrentStyle(); return getFont(c, style); }
CalculatedStyle style = c.getCurrentStyle();
public static Rectangle2D getTextBounds(Context c, InlineTextBox box) { CalculatedStyle style = c.getCurrentStyle(); return c.getTextRenderer().getLogicalBounds(c.getGraphics(), getFont(c, style), box.getSubstring()); }
getFont(c, style), box.getSubstring());
getFont(c), box.getSubstring());
public static Rectangle2D getTextBounds(Context c, InlineTextBox box) { CalculatedStyle style = c.getCurrentStyle(); return c.getTextRenderer().getLogicalBounds(c.getGraphics(), getFont(c, style), box.getSubstring()); }
public static int lineHeight(Context c, CalculatedStyle style) { int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), getFont(c, style), "Test").getHeight()); if (style.hasProperty(CSSName.LINE_HEIGHT)) {
public static int lineHeight(Context c) { CalculatedStyle style = c.getCurrentStyle(); int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), getFont(c), "Test").getHeight()); if (!style.propertyByName(CSSName.LINE_HEIGHT).computedValue().cssValue().getCssText().equals("normal")) {
public static int lineHeight(Context c, CalculatedStyle style) { int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), getFont(c, style), "Test").getHeight()); if (style.hasProperty(CSSName.LINE_HEIGHT)) { val = (int) style.getFloatPropertyRelative(CSSName.LINE_HEI...
assert b.contains(x, y) : "The coordinates are expected to be within the " + "view's bounds: x=" + x + ", y=" + y + "a=" + a;
public int viewToModel(GlyphView v, float x, float y, Shape a, Bias[] biasRet) { Rectangle b = a.getBounds(); assert b.contains(x, y) : "The coordinates are expected to be within the " + "view's bounds: x=" + x + ", y=" + y ...
assert false : e.toString(); text = "";
AssertionError ae = new AssertionError(); ae.initCause(e); throw ae;
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument()....
return 10;
updateMetrics(); float span = 0; Element el = getElement(); Document doc = el.getDocument(); Segment seg = new Segment(); switch (axis) { case X_AXIS: for (int i = 0; i < el.getElementCount(); i++) { Element child = el.getElement(i); int start = child.getStartOffset(); int end = child.getEndOffset(); try { doc.getTe...
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); return 10; }
ServerBrowserEndpoint(ServerSessionEndpoint session, String id,
ServerBrowserEndpoint(ServerSessionEndpoint session, int id,
ServerBrowserEndpoint(ServerSessionEndpoint session, String id, Channel destination, String messageSelector) throws JMSException { this.session = session; this.id = id; Filter filter = null; if (messageSelector != null) { filter = new Selector(mes...
session.producers.remove(this.id); Dispatcher.singleton.unregisterTarget(this.id);
session.producers.remove(Integer.valueOf(this.id)); JMSDispatcher.instance.unregisterTarget(Integer.valueOf(id));
public void close() throws JMSException { if (closed) { throw new IllegalStateException("Browser is already closed"); } iterator = null; session.producers.remove(this.id); Dispatcher.singleton.unregisterTarget(this.id); closed = true; }
if (log.isTraceEnabled()) { log.trace("returning the message corresponding to " + r); }
if (trace) { log.trace("returning the message corresponding to " + r); }
public Message nextMessage() throws JMSException { if (closed) { throw new IllegalStateException("Browser is closed"); } Routable r = (Routable)iterator.next(); if (log.isTraceEnabled()) { log.trace("returning the message corresponding to " + r); } return (Message)r.getM...
return "BrowserEndpoint[" + Util.guidToString(id) + "]";
return "BrowserEndpoint[" + id + "]";
public String toString() { return "BrowserEndpoint[" + Util.guidToString(id) + "]"; }
public synchronized void checkInResourceManager(String serverID)
public synchronized void checkInResourceManager(int serverID)
public synchronized void checkInResourceManager(String serverID) { Holder h = (Holder)holders.get(serverID); if (h == null) { throw new IllegalArgumentException("Cannot find resource manager for server: " + serverID); } h.refCount--; if (h.refCount == 0) ...
Holder h = (Holder)holders.get(serverID);
Integer in = new Integer(serverID); Holder h = (Holder)holders.get(in);
public synchronized void checkInResourceManager(String serverID) { Holder h = (Holder)holders.get(serverID); if (h == null) { throw new IllegalArgumentException("Cannot find resource manager for server: " + serverID); } h.refCount--; if (h.refCount == 0) ...
holders.remove(serverID);
holders.remove(in);
public synchronized void checkInResourceManager(String serverID) { Holder h = (Holder)holders.get(serverID); if (h == null) { throw new IllegalArgumentException("Cannot find resource manager for server: " + serverID); } h.refCount--; if (h.refCount == 0) ...
public synchronized ResourceManager checkOutResourceManager(String serverID)
public synchronized ResourceManager checkOutResourceManager(int serverID)
public synchronized ResourceManager checkOutResourceManager(String serverID) { Holder h = (Holder)holders.get(serverID); if (h == null) { h = new Holder(); holders.put(serverID, h); } else { h.refCount++; } return h.rm; }
Holder h = (Holder)holders.get(serverID);
Integer in = new Integer(serverID); Holder h = (Holder)holders.get(in);
public synchronized ResourceManager checkOutResourceManager(String serverID) { Holder h = (Holder)holders.get(serverID); if (h == null) { h = new Holder(); holders.put(serverID, h); } else { h.refCount++; } return h.rm; }
holders.put(serverID, h);
holders.put(in, h);
public synchronized ResourceManager checkOutResourceManager(String serverID) { Holder h = (Holder)holders.get(serverID); if (h == null) { h = new Holder(); holders.put(serverID, h); } else { h.refCount++; } return h.rm; }
public synchronized boolean containsResourceManager(String serverID)
public synchronized boolean containsResourceManager(int serverID)
public synchronized boolean containsResourceManager(String serverID) { return holders.containsKey(serverID); }
return holders.containsKey(serverID);
return holders.containsKey(new Integer(serverID));
public synchronized boolean containsResourceManager(String serverID) { return holders.containsKey(serverID); }
Queue queue = new Queue(1, ms, pm, true, true, 100, 20, 10, new QueuedExecutor(), null);
Queue queue = new Queue(1, ms, pm, true, true, 100, 20, 10, new QueuedExecutor());
public void test1() throws Throwable { Queue queue = new Queue(1, ms, pm, true, true, 100, 20, 10, new QueuedExecutor(), null); Message[] msgs = new Message[241]; MessageReference[] refs = new MessageReference[241]; //Send 99 Transaction tx = createXATx(); ...
this.clip = s;
public void clip(Shape s) { //clip = clip. // TODO Auto-generated method stub }
super("Unknown flag passed in " + s); if (s == null) throw new NullPointerException("Null flags value passed to constructor.");
public UnknownFormatFlagsException(String s) { this.flags = s; }
AnonymousBlockBox block = new AnonymousBlockBox(text, c);
AnonymousBlockBox block = new AnonymousBlockBox(content);
public Box createBox(Context c, Content content) { AnonymousBlockBox block = new AnonymousBlockBox(text, c); return block; }
public AnonymousBlockBox(Node startNode, Context c) {
public AnonymousBlockBox(Content content) {
public AnonymousBlockBox(Node startNode, Context c) { this.setNode(startNode.getParentNode()); node_list = InlineUtil.getInlineNodeList(startNode, (Element) this.getNode(), c, true); //this should now already have been done: node_list.add(0, startNode); last_node = (Node) node_list.get(n...
this.setNode(startNode.getParentNode()); node_list = InlineUtil.getInlineNodeList(startNode, (Element) this.getNode(), c, true); last_node = (Node) node_list.get(node_list.size() - 1);
super(); setContent(content); setNode(content.getElement());
public AnonymousBlockBox(Node startNode, Context c) { this.setNode(startNode.getParentNode()); node_list = InlineUtil.getInlineNodeList(startNode, (Element) this.getNode(), c, true); //this should now already have been done: node_list.add(0, startNode); last_node = (Node) node_list.get(n...
c.setCurrentPage(i);
private void paintPagedView(RenderingContext c, Layer root) { if (root.getLastPage() == null) { return; } root.assignPagePaintingPositions( c, Layer.PAGED_MODE_SCREEN, PAGE_PAINTING_CLEARANCE); setPreferredSize(new Dimension( root.getMaxPa...
queue = RenderQueue.getInstance();
queue = new RenderQueue();
protected void init() { queue = RenderQueue.getInstance(); documentListeners = new HashMap(); setBackground(Color.white); super.setLayout(null); layoutThread = new Thread(new LayoutLoop(this), "FlyingSaucer-Layout"); renderThread = new Thread(new RenderLoop(this), "FlyingSa...
} if ((isRootLayer() && ! isPositionsFinalized()) || getMaster().getStyle().isFixed()) { updateAllAbsoluteLocations(originX, originY, true);
public void paint(RenderingContext c, int originX, int originY) { if (getMaster().getStyle().isFixed()) { positionFixedLayer(c); } if ((isRootLayer() && ! isPositionsFinalized()) || getMaster().getStyle().isFixed()) { updateAllAbsoluteLocations(originX, ori...
public int getType()
public byte getType()
public int getType() { return JBossObjectMessage.TYPE; }
void acknowledge(String messageID, Transaction tx)
synchronized void acknowledge(String messageID, Transaction tx)
void acknowledge(String messageID, Transaction tx) { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { Delivery d = (Delivery)i.next(); if (d.getReference().getMessageID().equals...
private synchronized void grabMessage() { ready = true; channel.deliver(this);
private synchronized javax.jms.Message grabMessage() throws JMSException { if (closed) { if (log.isTraceEnabled()) { log.trace("consumer " + this + " closed, rejecting message" ); } throw new IllegalStateException("Consumer is closed"); } Message message = null; if (started) { MessageReference ref = null; try { re...
private synchronized void grabMessage() { ready = true; channel.deliver(this); }
if (log.isTraceEnabled()) { log.trace("receive invoked on client, grabbing a message from core"); } grabMessage();
log.warn("receive is not handled on the server");
public javax.jms.Message receive(long timeout) throws JMSException { if (log.isTraceEnabled()) { log.trace("receive invoked on client, grabbing a message from core"); } grabMessage(); // we return null, the message will arrive asynchronously later return null; }
log.info("receiver explicitely requesting message from the channel");
log.trace("receiver explicitely requesting message from the channel");
public void requestMessages() { if (channel == null) { log.error("No channel, cannot request messages"); return; } log.info("receiver explicitely requesting message from the channel"); channel.deliver(true); }
throw e;
private void handleFailure(Throwable t, Transaction tx) throws JMSException { final String msg1 = "Exception caught in processing transaction"; log.error(msg1, t); log.info("Attempting to rollback"); try { tx.rollback(); Exception e = new TransactionRolledBackExceptio...
if (log.isTraceEnabled()) { log.trace("sending " + ref + " to the core"); }
if (log.isTraceEnabled()) { log.trace("sending " + ref + " to the core, destination: " + jmsDestination.getName()); }
void sendMessage(Message m) throws JMSException { //The JMSDestination header must already have been set for each message JBossDestination jmsDestination = (JBossDestination)m.getJMSDestination(); if (jmsDestination == null) { throw new IllegalStateException("JMSDestination header not s...
if(c.inSelection(inline)) { int dw = inline.width -2; int xoff = 0; if(c.getSelectionEnd() == inline) { dw = c.getSelectionEndX(); } if(c.getSelectionStart() == inline) { xoff = c.getSelectionStartX(); } GraphicsUtil.draw(c.getGraphics(), new Rectangle(lx+inline.x+xoff,ly+inline.y-inline.height, dw-xoff,inline.height),...
private static void paintInline(Context c, InlineBox inline, int lx, int ly, LineBox line) { if(InlineLayout.isReplaced(inline.node)) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y+(line.baseline-inline.height)); Layout layout ...
outerBox.calcCanvasLocation(); outerBox.calcChildLocations();
public static Box layout(LayoutContext c, BlockBox outerBox, Content content, Boxing.StyleSetListener listener) { boolean set_bfc = false; if (content instanceof TableContent) { } else { XRLog.layout(Level.WARNING, "Unsupported table type " + content.getClass().getName())...
if (style.hasProperty(CSSName.TOP)) {
if (!style.isIdent(CSSName.TOP, IdentValue.AUTO)) {
public static void setupFixed(Context c, Box box) { if (c.getCurrentStyle().isIdent(CSSName.POSITION, IdentValue.FIXED)) { box.fixed = true; box.setChildrenExceedBounds(true); Rectangle rect = c.getFixedRectangle(); CalculatedStyle style = c.getCurrentStyle(); ...
if (style.hasProperty(CSSName.RIGHT)) {
if (!style.isIdent(CSSName.RIGHT, IdentValue.AUTO)) {
public static void setupFixed(Context c, Box box) { if (c.getCurrentStyle().isIdent(CSSName.POSITION, IdentValue.FIXED)) { box.fixed = true; box.setChildrenExceedBounds(true); Rectangle rect = c.getFixedRectangle(); CalculatedStyle style = c.getCurrentStyle(); ...
if (style.hasProperty(CSSName.BOTTOM)) {
if (!style.isIdent(CSSName.BOTTOM, IdentValue.AUTO)) {
public static void setupFixed(Context c, Box box) { if (c.getCurrentStyle().isIdent(CSSName.POSITION, IdentValue.FIXED)) { box.fixed = true; box.setChildrenExceedBounds(true); Rectangle rect = c.getFixedRectangle(); CalculatedStyle style = c.getCurrentStyle(); ...
if (style.hasProperty(CSSName.LEFT)) {
if (!style.isIdent(CSSName.LEFT, IdentValue.AUTO)) {
public static void setupFixed(Context c, Box box) { if (c.getCurrentStyle().isIdent(CSSName.POSITION, IdentValue.FIXED)) { box.fixed = true; box.setChildrenExceedBounds(true); Rectangle rect = c.getFixedRectangle(); CalculatedStyle style = c.getCurrentStyle(); ...
child_box.y = box.height;
double initialY = box.height; child_box.y = (int) initialY;
public static void layoutContent(Context c, Box box, List contentList, Box block) { // prepare for the list items int old_counter = c.getListCounter(); c.setListCounter(0); Iterator contentIterator = contentList.iterator(); while (contentIterator.hasNext()) { Object o =...
box.height += child_box.height;
box.height += (child_box.y - initialY) + child_box.height;
public static void layoutContent(Context c, Box box, List contentList, Box block) { // prepare for the list items int old_counter = c.getListCounter(); c.setListCounter(0); Iterator contentIterator = contentList.iterator(); while (contentIterator.hasNext()) { Object o =...
if (Configuration.isTrue("xr.incremental.enabled", false)) { RenderQueue.getInstance().dispatchRepaintEvent(new ReflowEvent(ReflowEvent.MORE_BOXES_AVAILABLE, box, max_size));
if (Configuration.isTrue("xr.incremental.enabled", false) && c.isRenderQueueAvailable()) { c.getRenderQueue().dispatchRepaintEvent(new ReflowEvent(ReflowEvent.MORE_BOXES_AVAILABLE, box, max_size));
public static void layoutContent(Context c, Box box, List contentList, Box block) { // prepare for the list items int old_counter = c.getListCounter(); c.setListCounter(0); Iterator contentIterator = contentList.iterator(); while (contentIterator.hasNext()) { Object o =...
while (contentList.size() > 0 && !c.shouldStop()) { Object o = contentList.get(0); contentList.remove(0);
Iterator contentIter = contentList.iterator(); while (contentIter.hasNext() && !c.shouldStop()) { Object o = contentIter.next();
public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);...
Relative.translateRelative(c);
Relative.translateRelative(c, false);
public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);...
Relative.untranslateRelative(c);
Relative.untranslateRelative(c, false);
public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);...
saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, false, blockLineHeight, pushedOnFirstLine);
saveLine(curr_line, currentStyle, prev_line, bounds, c, box, false, blockLineHeight, pushedOnFirstLine);
public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);...
saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, true, blockLineHeight, pushedOnFirstLine);
saveLine(curr_line, currentStyle, prev_line, bounds, c, box, true, blockLineHeight, pushedOnFirstLine);
public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);...
if (box.getBlockFormattingContext() != null) { c.pushBFC(box.getBlockFormattingContext());
c.getGraphics().translate(box.x, box.y); if (box.getPersistentBFC() != null) { c.pushBFC(new BlockFormattingContext(box.getPersistentBFC()));
public static void paintBlockContext(Context c, Box box, boolean restyle) { //if (box.getBlockFormattingContext() != null) c.pushBFC(box.getBlockFormattingContext()); c.translate(box.x, box.y); if (box.getBlockFormattingContext() != null) { c.pushBFC(box.getBlockFormattingContext());...
if (box.getBlockFormattingContext() != null) {
if (box.getPersistentBFC() != null) {
public static void paintBlockContext(Context c, Box box, boolean restyle) { //if (box.getBlockFormattingContext() != null) c.pushBFC(box.getBlockFormattingContext()); c.translate(box.x, box.y); if (box.getBlockFormattingContext() != null) { c.pushBFC(box.getBlockFormattingContext());...
c.getGraphics().translate(-box.x, -box.y);
public static void paintBlockContext(Context c, Box box, boolean restyle) { //if (box.getBlockFormattingContext() != null) c.pushBFC(box.getBlockFormattingContext()); c.translate(box.x, box.y); if (box.getBlockFormattingContext() != null) { c.pushBFC(box.getBlockFormattingContext());...
public void columnMarginChanged(ChangeEvent event);
void columnMarginChanged(ChangeEvent event);
public void columnMarginChanged(ChangeEvent event);
public void columnSelectionChanged(ListSelectionEvent event);
void columnSelectionChanged(ListSelectionEvent event);
public void columnSelectionChanged(ListSelectionEvent event);
setSelectionModel(createSelectionModel());
selectionModel = createSelectionModel(); selectionModel.addListSelectionListener(this);
public DefaultTableColumnModel() { tableColumns = new Vector(); setSelectionModel(createSelectionModel()); columnMargin = 1; columnSelectionAllowed = false; }
void setColumnSelectionAllowed(boolean value);
void setColumnSelectionAllowed(boolean allowed);
void setColumnSelectionAllowed(boolean value);
public void tableChanged(TableModelEvent event);
void tableChanged(TableModelEvent event);
public void tableChanged(TableModelEvent event);
if (log.isTraceEnabled()) { log.trace(sql); log.trace("Inserted " + rows + " rows"); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, channelID, ref.getMessageID(), ref.getStoreID(), null, "C") + " inserted " + rows + " row(s)"); }
public void add(Serializable channelID, Delivery d) throws Exception { if (log.isTraceEnabled()) { log.trace("Adding delivery " + d + " to channel: " + channelID);} Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { ...
ps = conn.prepareStatement("INSERT INTO TRANSACTION (TRANSACTIONID) values(?)");
String sql = "INSERT INTO TRANSACTION (TRANSACTIONID) values(?)"; ps = conn.prepareStatement(sql);
protected void addTXRecord(Connection conn, Transaction tx) throws Exception { PreparedStatement ps = null; try { ps = conn.prepareStatement("INSERT INTO TRANSACTION (TRANSACTIONID) values(?)"); ps.setString(1, String.valueOf(tx.getID())); ps.executeUpdate(); } fina...
ps.executeUpdate();
int rows = ps.executeUpdate(); if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, String.valueOf(tx.getID())) + " inserted " + rows + " row(s)"); }
protected void addTXRecord(Connection conn, Transaction tx) throws Exception { PreparedStatement ps = null; try { ps = conn.prepareStatement("INSERT INTO TRANSACTION (TRANSACTIONID) values(?)"); ps.setString(1, String.valueOf(tx.getID())); ps.executeUpdate(); } fina...
if (log.isTraceEnabled()) { log.trace("Committing transaction:" + tx.getID()); }
if (log.isTraceEnabled()) { log.trace("updating database for committing transaction " + tx); }
public void commitTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Committing transaction:" + tx.getID()); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConn...
if (log.isTraceEnabled()) { log.trace("Removed " + rows + " rows from DELIVERY"); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, String.valueOf(tx.getID())) + " removed " + rows + " row(s)"); }
public void commitTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Committing transaction:" + tx.getID()); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConn...
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, null, String.valueOf(tx.getID())) + " updated " + rows + " row(s)"); }
public void commitTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Committing transaction:" + tx.getID()); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConn...
if (log.isTraceEnabled()) { log.trace("Updated " + rows + " rows in MESSAGE_REFERENCES"); }
public void commitTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Committing transaction:" + tx.getID()); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConn...
String sql = "SELECT MESSAGEID, STOREID FROM DELIVERY WHERE CHANNELID=? AND STATE='C'";
String sql = "SELECT MESSAGEID, STOREID FROM DELIVERY " + "WHERE CHANNELID=? AND (STATE='C' OR STATE='-')";
public List deliveries(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("listing deliveries for channel: " + channelID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ...
if (log.isTraceEnabled()) { log.trace(sql); }
public List deliveries(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("listing deliveries for channel: " + channelID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ...