bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public void invoke(JFrame parentFrame, PreferencesPanel contentPane) { this.prefPanel = contentPane; // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); // Construct Dialog preferenceDialog = new JDialog(parentFrame, "Preferences", true); Object[] options = {"Close"}; pane = new JOptionPane(contentPane, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); preferenceDialog.pack(); preferenceDialog.setSize(600, 500); preferenceDialog.setContentPane(mainPanel); preferenceDialog.setLocationRelativeTo(SparkManager.getMainWindow()); pane.addPropertyChangeListener(this); preferenceDialog.setVisible(true); }
public void invoke(JFrame parentFrame, PreferencesPanel contentPane) { this.prefPanel = contentPane; // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); // Construct Dialog preferenceDialog = new JDialog(parentFrame, "Preferences", false); Object[] options = {"Close"}; pane = new JOptionPane(contentPane, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); preferenceDialog.pack(); preferenceDialog.setSize(600, 500); preferenceDialog.setContentPane(mainPanel); preferenceDialog.setLocationRelativeTo(SparkManager.getMainWindow()); pane.addPropertyChangeListener(this); preferenceDialog.setVisible(false); }
1,123,059
protected PropertyEditor createPropertyEditor(String propertyEditor) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if( cl==null ) { cl = XBeanNamespaceHandler.class.getClassLoader(); } try { return (PropertyEditor)cl.loadClass(propertyEditor).newInstance(); } catch (Throwable e){ throw new IllegalArgumentException("Could not load property editor: "+propertyEditor, e); } }
protected PropertyEditor createPropertyEditor(String propertyEditor) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if( cl==null ) { cl = XBeanNamespaceHandler.class.getClassLoader(); } try { return (PropertyEditor)cl.loadClass(propertyEditor).newInstance(); } catch (Throwable e){ throw (IllegalArgumentException)new IllegalArgumentException("Could not load property editor: "+propertyEditor).initCause(e); } }
1,123,060
public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineRate); } if (totalBranchRate != null) { getJava().createArg().setValue("--totalbranch"); getJava().createArg().setValue(totalBranchRate); } if (totalLineRate != null) { getJava().createArg().setValue("--totalline"); getJava().createArg().setValue(totalLineRate); } Iterator iter = regexes.iterator(); while (iter.hasNext()) { getJava().createArg().setValue("--regex"); getJava().createArg().setValue(iter.next().toString()); } int returnCode = getJava().executeJava(); // Check the return code and print a message if (returnCode == 0) System.out.println("All checks passed."); else if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else System.err.println("Coverage check failed. See messages above."); }
public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineRate); } if (totalBranchRate != null) { getJava().createArg().setValue("--totalbranch"); getJava().createArg().setValue(totalBranchRate); } if (totalLineRate != null) { getJava().createArg().setValue("--totalline"); getJava().createArg().setValue(totalLineRate); } Iterator iter = regexes.iterator(); while (iter.hasNext()) { getJava().createArg().setValue("--regex"); getJava().createArg().setValue(iter.next().toString()); } int returnCode = getJava().executeJava(); // Check the return code and print a message if (returnCode == 0) System.out.println("All checks passed."); else if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else System.err.println("Coverage check failed. See messages above."); }
1,123,061
public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineRate); } if (totalBranchRate != null) { getJava().createArg().setValue("--totalbranch"); getJava().createArg().setValue(totalBranchRate); } if (totalLineRate != null) { getJava().createArg().setValue("--totalline"); getJava().createArg().setValue(totalLineRate); } Iterator iter = regexes.iterator(); while (iter.hasNext()) { getJava().createArg().setValue("--regex"); getJava().createArg().setValue(iter.next().toString()); } int returnCode = getJava().executeJava(); // Check the return code and print a message if (returnCode == 0) System.out.println("All checks passed."); else if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else System.err.println("Coverage check failed. See messages above."); }
public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineRate); } if (totalBranchRate != null) { getJava().createArg().setValue("--totalbranch"); getJava().createArg().setValue(totalBranchRate); } if (totalLineRate != null) { getJava().createArg().setValue("--totalline"); getJava().createArg().setValue(totalLineRate); } Iterator iter = regexes.iterator(); while (iter.hasNext()) { getJava().createArg().setValue("--regex"); getJava().createArg().setValue(iter.next().toString()); } int returnCode = getJava().executeJava(); // Check the return code and print a message if (returnCode == 0) System.out.println("All checks passed."); else if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else { if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else if (failureProperty != null) getProject().setProperty(failureProperty, "true"); else System.err .println("Coverage check failed. See messages above."); } }
1,123,062
public Object getValue (Context context) throws PropertyException { return context.getProperty(_names[0]); }
public Object getValue (Context context) throws PropertyException { return context.getProperty(_names); }
1,123,063
public void chatRoomOpened(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.isHideChatHistory()) { return; } final String jid = room.getRoomname(); File transcriptFile = ChatTranscripts.getTranscriptFile(jid); if (!transcriptFile.exists()) { return; } final TranscriptWindow roomWindow = room.getTranscriptWindow(); final TranscriptWindow window = new TranscriptWindow(); window.setEditable(false); window.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { room.getChatInputEditor().requestFocusInWindow(); } }); insertHistory(room, roomWindow); if (room instanceof ChatRoomImpl) { // Add History Button ChatRoomButton chatRoomButton = new ChatRoomButton(SparkRes.getImageIcon(SparkRes.HISTORY_24x24_IMAGE)); room.getToolBar().addChatRoomButton(chatRoomButton); chatRoomButton.setToolTipText("View history"); chatRoomButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { ChatRoomImpl roomImpl = (ChatRoomImpl)room; showHistory(roomImpl.getParticipantJID()); } }); } }
public void chatRoomOpened(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (!pref.isChatHistoryEnabled()) { return; } final String jid = room.getRoomname(); File transcriptFile = ChatTranscripts.getTranscriptFile(jid); if (!transcriptFile.exists()) { return; } final TranscriptWindow roomWindow = room.getTranscriptWindow(); final TranscriptWindow window = new TranscriptWindow(); window.setEditable(false); window.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { room.getChatInputEditor().requestFocusInWindow(); } }); insertHistory(room, roomWindow); if (room instanceof ChatRoomImpl) { // Add History Button ChatRoomButton chatRoomButton = new ChatRoomButton(SparkRes.getImageIcon(SparkRes.HISTORY_24x24_IMAGE)); room.getToolBar().addChatRoomButton(chatRoomButton); chatRoomButton.setToolTipText("View history"); chatRoomButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { ChatRoomImpl roomImpl = (ChatRoomImpl)room; showHistory(roomImpl.getParticipantJID()); } }); } }
1,123,064
private void persistChatRoom(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.isHideChatHistory()) { return; } final String jid = room.getRoomname(); List transcripts = room.getTranscripts(); Iterator messages = transcripts.iterator(); ChatTranscript transcript = ChatTranscripts.getChatTranscript(jid); while (messages.hasNext()) { Message message = (Message)messages.next(); HistoryMessage history = new HistoryMessage(); history.setTo(message.getTo()); history.setFrom(message.getFrom()); history.setBody(message.getBody()); Date date = (Date)message.getProperty("date"); if (date != null) { history.setDate(date); } else { history.setDate(new Date()); } transcript.addHistoryMessage(history); } ChatTranscripts.saveTranscript(jid); }
private void persistChatRoom(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (!pref.isChatHistoryEnabled()) { return; } final String jid = room.getRoomname(); List transcripts = room.getTranscripts(); Iterator messages = transcripts.iterator(); ChatTranscript transcript = ChatTranscripts.getChatTranscript(jid); while (messages.hasNext()) { Message message = (Message)messages.next(); HistoryMessage history = new HistoryMessage(); history.setTo(message.getTo()); history.setFrom(message.getFrom()); history.setBody(message.getBody()); Date date = (Date)message.getProperty("date"); if (date != null) { history.setDate(date); } else { history.setDate(new Date()); } transcript.addHistoryMessage(history); } ChatTranscripts.saveTranscript(jid); }
1,123,065
private void showHistory(final String jid) { SwingWorker transcriptLoader = new SwingWorker() { public Object construct() { return ChatTranscripts.getChatTranscript(jid); } public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow window = new TranscriptWindow(); final JScrollPane pane = new JScrollPane(window); pane.getVerticalScrollBar().setBlockIncrement(50); pane.getVerticalScrollBar().setUnitIncrement(20); mainPanel.add(pane, BorderLayout.CENTER); ChatTranscript transcript = (ChatTranscript)get(); List<HistoryMessage> list = transcript.getMessages(); Collections.sort(list, dateComparator); for (HistoryMessage message : list) { String from = message.getFrom(); String nickname = StringUtils.parseName(from); final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a"); final String date = formatter.format(message.getDate()); String prefix = nickname + " [" + date + "]"; if (from.equals(SparkManager.getSessionManager().getJID())) { window.insertCustomMessage(prefix, message.getBody()); } else { window.insertCustomOtherMessage(prefix, message.getBody()); } } // Handle no history if (transcript.getMessages().size() == 0) { window.setText("There is no current chat history."); } final JFrame frame = new JFrame("History For " + jid); frame.setIconImage(SparkRes.getImageIcon(SparkRes.HISTORY_16x16).getImage()); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(mainPanel, BorderLayout.CENTER); frame.pack(); frame.setSize(600, 400); window.setCaretPosition(0); GraphicUtils.centerWindowOnScreen(frame); frame.setVisible(true); } }; transcriptLoader.start(); }
private void showHistory(final String jid) { SwingWorker transcriptLoader = new SwingWorker() { public Object construct() { String bareJID = StringUtils.parseBareAddress(jid); return ChatTranscripts.getChatTranscript(bareJID); } public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow window = new TranscriptWindow(); final JScrollPane pane = new JScrollPane(window); pane.getVerticalScrollBar().setBlockIncrement(50); pane.getVerticalScrollBar().setUnitIncrement(20); mainPanel.add(pane, BorderLayout.CENTER); ChatTranscript transcript = (ChatTranscript)get(); List<HistoryMessage> list = transcript.getMessages(); Collections.sort(list, dateComparator); for (HistoryMessage message : list) { String from = message.getFrom(); String nickname = StringUtils.parseName(from); final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a"); final String date = formatter.format(message.getDate()); String prefix = nickname + " [" + date + "]"; if (from.equals(SparkManager.getSessionManager().getJID())) { window.insertCustomMessage(prefix, message.getBody()); } else { window.insertCustomOtherMessage(prefix, message.getBody()); } } // Handle no history if (transcript.getMessages().size() == 0) { window.setText("There is no current chat history."); } final JFrame frame = new JFrame("History For " + jid); frame.setIconImage(SparkRes.getImageIcon(SparkRes.HISTORY_16x16).getImage()); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(mainPanel, BorderLayout.CENTER); frame.pack(); frame.setSize(600, 400); window.setCaretPosition(0); GraphicUtils.centerWindowOnScreen(frame); frame.setVisible(true); } }; transcriptLoader.start(); }
1,123,066
private void showHistory(final String jid) { SwingWorker transcriptLoader = new SwingWorker() { public Object construct() { return ChatTranscripts.getChatTranscript(jid); } public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow window = new TranscriptWindow(); final JScrollPane pane = new JScrollPane(window); pane.getVerticalScrollBar().setBlockIncrement(50); pane.getVerticalScrollBar().setUnitIncrement(20); mainPanel.add(pane, BorderLayout.CENTER); ChatTranscript transcript = (ChatTranscript)get(); List<HistoryMessage> list = transcript.getMessages(); Collections.sort(list, dateComparator); for (HistoryMessage message : list) { String from = message.getFrom(); String nickname = StringUtils.parseName(from); final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a"); final String date = formatter.format(message.getDate()); String prefix = nickname + " [" + date + "]"; if (from.equals(SparkManager.getSessionManager().getJID())) { window.insertCustomMessage(prefix, message.getBody()); } else { window.insertCustomOtherMessage(prefix, message.getBody()); } } // Handle no history if (transcript.getMessages().size() == 0) { window.setText("There is no current chat history."); } final JFrame frame = new JFrame("History For " + jid); frame.setIconImage(SparkRes.getImageIcon(SparkRes.HISTORY_16x16).getImage()); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(mainPanel, BorderLayout.CENTER); frame.pack(); frame.setSize(600, 400); window.setCaretPosition(0); GraphicUtils.centerWindowOnScreen(frame); frame.setVisible(true); } }; transcriptLoader.start(); }
private void showHistory(final String jid) { SwingWorker transcriptLoader = new SwingWorker() { public Object construct() { return ChatTranscripts.getChatTranscript(jid); } public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow window = new TranscriptWindow(); final JScrollPane pane = new JScrollPane(window); pane.getVerticalScrollBar().setBlockIncrement(50); pane.getVerticalScrollBar().setUnitIncrement(20); mainPanel.add(pane, BorderLayout.CENTER); ChatTranscript transcript = (ChatTranscript)get(); List<HistoryMessage> list = transcript.getMessages(); for (HistoryMessage message : list) { String from = message.getFrom(); String nickname = StringUtils.parseName(from); final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a"); final String date = formatter.format(message.getDate()); String prefix = nickname + " [" + date + "]"; if (from.equals(SparkManager.getSessionManager().getJID())) { window.insertCustomMessage(prefix, message.getBody()); } else { window.insertCustomOtherMessage(prefix, message.getBody()); } } // Handle no history if (transcript.getMessages().size() == 0) { window.setText("There is no current chat history."); } final JFrame frame = new JFrame("History For " + jid); frame.setIconImage(SparkRes.getImageIcon(SparkRes.HISTORY_16x16).getImage()); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(mainPanel, BorderLayout.CENTER); frame.pack(); frame.setSize(600, 400); window.setCaretPosition(0); GraphicUtils.centerWindowOnScreen(frame); frame.setVisible(true); } }; transcriptLoader.start(); }
1,123,067
public Object construct() { return ChatTranscripts.getChatTranscript(jid); }
public Object construct() { String bareJID = StringUtils.parseBareAddress(jid); return ChatTranscripts.getChatTranscript(bareJID); }
1,123,068
public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow window = new TranscriptWindow(); final JScrollPane pane = new JScrollPane(window); pane.getVerticalScrollBar().setBlockIncrement(50); pane.getVerticalScrollBar().setUnitIncrement(20); mainPanel.add(pane, BorderLayout.CENTER); ChatTranscript transcript = (ChatTranscript)get(); List<HistoryMessage> list = transcript.getMessages(); Collections.sort(list, dateComparator); for (HistoryMessage message : list) { String from = message.getFrom(); String nickname = StringUtils.parseName(from); final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a"); final String date = formatter.format(message.getDate()); String prefix = nickname + " [" + date + "]"; if (from.equals(SparkManager.getSessionManager().getJID())) { window.insertCustomMessage(prefix, message.getBody()); } else { window.insertCustomOtherMessage(prefix, message.getBody()); } } // Handle no history if (transcript.getMessages().size() == 0) { window.setText("There is no current chat history."); } final JFrame frame = new JFrame("History For " + jid); frame.setIconImage(SparkRes.getImageIcon(SparkRes.HISTORY_16x16).getImage()); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(mainPanel, BorderLayout.CENTER); frame.pack(); frame.setSize(600, 400); window.setCaretPosition(0); GraphicUtils.centerWindowOnScreen(frame); frame.setVisible(true); }
public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow window = new TranscriptWindow(); final JScrollPane pane = new JScrollPane(window); pane.getVerticalScrollBar().setBlockIncrement(50); pane.getVerticalScrollBar().setUnitIncrement(20); mainPanel.add(pane, BorderLayout.CENTER); ChatTranscript transcript = (ChatTranscript)get(); List<HistoryMessage> list = transcript.getMessages(); for (HistoryMessage message : list) { String from = message.getFrom(); String nickname = StringUtils.parseName(from); final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a"); final String date = formatter.format(message.getDate()); String prefix = nickname + " [" + date + "]"; if (from.equals(SparkManager.getSessionManager().getJID())) { window.insertCustomMessage(prefix, message.getBody()); } else { window.insertCustomOtherMessage(prefix, message.getBody()); } } // Handle no history if (transcript.getMessages().size() == 0) { window.setText("There is no current chat history."); } final JFrame frame = new JFrame("History For " + jid); frame.setIconImage(SparkRes.getImageIcon(SparkRes.HISTORY_16x16).getImage()); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(mainPanel, BorderLayout.CENTER); frame.pack(); frame.setSize(600, 400); window.setCaretPosition(0); GraphicUtils.centerWindowOnScreen(frame); frame.setVisible(true); }
1,123,069
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactory; this.classLoader = classLoader; this.service = service; this.unsatisfiedConditions = unsatisfiedConditions; cause = null; }
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactory; this.classLoader = classLoader; this.service = service; this.unsatisfiedConditions = unsatisfiedConditions; cause = null; }
1,123,070
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactory; this.classLoader = classLoader; this.service = service; this.unsatisfiedConditions = unsatisfiedConditions; cause = null; }
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactory; this.classLoader = classLoader; this.service = service; cause = null; }
1,123,071
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = Util.getCCN(finder.findFile(packageData.getSourceFileName()), false); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" branch-rate=\"" + packageData.getBranchCoverageRate() + "\" complexity=\"" + ccn + "\"" + ">"); increaseIndentation(); dumpSourceFiles(packageData); decreaseIndentation(); println("</package>"); }
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = packageData.getCCN(finder); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" branch-rate=\"" + packageData.getBranchCoverageRate() + "\" complexity=\"" + ccn + "\"" + ">"); increaseIndentation(); dumpSourceFiles(packageData); decreaseIndentation(); println("</package>"); }
1,123,073
public ArticleBlock(String titleKey, WFTabListener taskbarListener) { super(titleKey); setId(ARTICLE_BLOCK_ID); getTitlebar().setValueRefTitle(true); setMainAreaStyleClass(null); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setId(TASKBAR_ID); add(tb); tb.addButtonVB(TASK_ID_EDIT, bref + "edit", getEditContainer()); tb.addButtonVB(TASK_ID_PREVIEW, bref + "preview", getPreviewContainer());// tb.addButtonVB(TASK_ID_MESSAGES, bref + "messages", getMessageContainer()); tb.setSelectedButtonId(TASK_ID_EDIT); if (taskbarListener != null) { tb.addTaskbarListener(taskbarListener); } }
public ArticleBlock(String titleKey, WFTabListener taskbarListener) { super(titleKey); setId(ARTICLE_BLOCK_ID); getTitlebar().setValueRefTitle(true); setMainAreaStyleClass(null); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setId(TASKBAR_ID); add(tb); tb.addButtonVB(TASK_ID_EDIT, bref + "edit", getEditContainer()); tb.addButtonVB(TASK_ID_PREVIEW, bref + "preview", getPreviewContainer());// tb.addButtonVB(TASK_ID_MESSAGES, bref + "messages", getMessageContainer()); tb.setSelectedButtonId(TASK_ID_EDIT); if (taskbarListener != null) { tb.addTaskbarListener(taskbarListener); } }
1,123,074
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"); if (description == null) { description = javaClass.getComment(); } String namespace = getProperty(xbeanTag, "namespace", defaultNamespace); boolean root = getBooleanProperty(xbeanTag, "rootElement"); String contentProperty = getProperty(xbeanTag, "contentProperty"); Map mapsByPropertyName = new HashMap(); List flatProperties = new ArrayList(); Map flatCollections = new HashMap(); Set attributes = new HashSet(); Map attributesByPropertyName = new HashMap(); for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { BeanProperty[] beanProperties = jClass.getBeanProperties(); for (int i = 0; i < beanProperties.length; i++) { BeanProperty beanProperty = beanProperties[i]; // we only care about properties with a setter if (beanProperty.getMutator() != null) { AttributeMapping attributeMapping = loadAttribute(beanProperty, ""); if (attributeMapping != null) { attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } JavaMethod acc = beanProperty.getAccessor(); if (acc != null) { DocletTag mapTag = acc.getTagByName(MAP_ANNOTATION); if (mapTag != null) { MapMapping mm = new MapMapping(mapTag.getNamedParameter("entryName"), mapTag.getNamedParameter("keyName")); mapsByPropertyName.put(beanProperty.getName(), mm); } DocletTag flatColTag = acc.getTagByName(FLAT_COLLECTION_ANNOTATION); if (flatColTag != null) { String childName = flatColTag.getNamedParameter("childElement"); if (childName == null) throw new InvalidModelException("Flat collections must specify the childElement attribute."); flatCollections.put(beanProperty.getName(), childName); } DocletTag flatPropTag = acc.getTagByName(FLAT_PROPERTY_ANNOTATION); if (flatPropTag != null) { flatProperties.add(beanProperty.getName()); } } } } } String initMethod = null; String destroyMethod = null; String factoryMethod = null; for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; if (method.isPublic() && !method.isConstructor()) { if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) { initMethod = method.getName(); } if (destroyMethod == null && method.getTagByName(DESTROY_METHOD_ANNOTATION) != null) { destroyMethod = method.getName(); } if (factoryMethod == null && method.getTagByName(FACTORY_METHOD_ANNOTATION) != null) { factoryMethod = method.getName(); } } } } List constructorArgs = new ArrayList(); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; JavaParameter[] parameters = method.getParameters(); if (isValidConstructor(factoryMethod, method, parameters)) { List args = new ArrayList(parameters.length); for (int j = 0; j < parameters.length; j++) { JavaParameter parameter = parameters[j]; AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName()); if (attributeMapping == null) { attributeMapping = loadParameter(parameter); attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null))); } constructorArgs.add(Collections.unmodifiableList(args)); } } HashSet interfaces = new HashSet(); interfaces.addAll( getFullyQulifiedNames( javaClass.getImplementedInterfaces() ) ); System.out.println("Checking: "+javaClass.getFullyQualifiedName()); ArrayList superClasses = new ArrayList(); JavaClass p = javaClass; while( true ) { JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break; } p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) ); } return new ElementMapping(namespace, element, javaClass.getFullyQualifiedName(), description, root, initMethod, destroyMethod, factoryMethod, contentProperty, attributes, constructorArgs, flatProperties, mapsByPropertyName, flatCollections, superClasses, interfaces); }
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"); if (description == null) { description = javaClass.getComment(); } String namespace = getProperty(xbeanTag, "namespace", defaultNamespace); boolean root = getBooleanProperty(xbeanTag, "rootElement"); String contentProperty = getProperty(xbeanTag, "contentProperty"); Map mapsByPropertyName = new HashMap(); List flatProperties = new ArrayList(); Map flatCollections = new HashMap(); Set attributes = new HashSet(); Map attributesByPropertyName = new HashMap(); for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { BeanProperty[] beanProperties = jClass.getBeanProperties(); for (int i = 0; i < beanProperties.length; i++) { BeanProperty beanProperty = beanProperties[i]; // we only care about properties with a setter if (beanProperty.getMutator() != null) { AttributeMapping attributeMapping = loadAttribute(beanProperty, ""); if (attributeMapping != null) { attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } JavaMethod acc = beanProperty.getAccessor(); if (acc != null) { DocletTag mapTag = acc.getTagByName(MAP_ANNOTATION); if (mapTag != null) { MapMapping mm = new MapMapping(mapTag.getNamedParameter("entryName"), mapTag.getNamedParameter("keyName")); mapsByPropertyName.put(beanProperty.getName(), mm); } DocletTag flatColTag = acc.getTagByName(FLAT_COLLECTION_ANNOTATION); if (flatColTag != null) { String childName = flatColTag.getNamedParameter("childElement"); if (childName == null) throw new InvalidModelException("Flat collections must specify the childElement attribute."); flatCollections.put(beanProperty.getName(), childName); } DocletTag flatPropTag = acc.getTagByName(FLAT_PROPERTY_ANNOTATION); if (flatPropTag != null) { flatProperties.add(beanProperty.getName()); } } } } } String initMethod = null; String destroyMethod = null; String factoryMethod = null; for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; if (method.isPublic() && !method.isConstructor()) { if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) { initMethod = method.getName(); } if (destroyMethod == null && method.getTagByName(DESTROY_METHOD_ANNOTATION) != null) { destroyMethod = method.getName(); } if (factoryMethod == null && method.getTagByName(FACTORY_METHOD_ANNOTATION) != null) { factoryMethod = method.getName(); } } } } List constructorArgs = new ArrayList(); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; JavaParameter[] parameters = method.getParameters(); if (isValidConstructor(factoryMethod, method, parameters)) { List args = new ArrayList(parameters.length); for (int j = 0; j < parameters.length; j++) { JavaParameter parameter = parameters[j]; AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName()); if (attributeMapping == null) { attributeMapping = loadParameter(parameter); attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null))); } constructorArgs.add(Collections.unmodifiableList(args)); } } HashSet interfaces = new HashSet(); interfaces.addAll( getFullyQualifiedNames( javaClass.getImplementedInterfaces() ) ); System.out.println("Checking: "+javaClass.getFullyQualifiedName()); ArrayList superClasses = new ArrayList(); JavaClass p = javaClass; while( true ) { JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break; } p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) ); } return new ElementMapping(namespace, element, javaClass.getFullyQualifiedName(), description, root, initMethod, destroyMethod, factoryMethod, contentProperty, attributes, constructorArgs, flatProperties, mapsByPropertyName, flatCollections, superClasses, interfaces); }
1,123,075
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"); if (description == null) { description = javaClass.getComment(); } String namespace = getProperty(xbeanTag, "namespace", defaultNamespace); boolean root = getBooleanProperty(xbeanTag, "rootElement"); String contentProperty = getProperty(xbeanTag, "contentProperty"); Map mapsByPropertyName = new HashMap(); List flatProperties = new ArrayList(); Map flatCollections = new HashMap(); Set attributes = new HashSet(); Map attributesByPropertyName = new HashMap(); for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { BeanProperty[] beanProperties = jClass.getBeanProperties(); for (int i = 0; i < beanProperties.length; i++) { BeanProperty beanProperty = beanProperties[i]; // we only care about properties with a setter if (beanProperty.getMutator() != null) { AttributeMapping attributeMapping = loadAttribute(beanProperty, ""); if (attributeMapping != null) { attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } JavaMethod acc = beanProperty.getAccessor(); if (acc != null) { DocletTag mapTag = acc.getTagByName(MAP_ANNOTATION); if (mapTag != null) { MapMapping mm = new MapMapping(mapTag.getNamedParameter("entryName"), mapTag.getNamedParameter("keyName")); mapsByPropertyName.put(beanProperty.getName(), mm); } DocletTag flatColTag = acc.getTagByName(FLAT_COLLECTION_ANNOTATION); if (flatColTag != null) { String childName = flatColTag.getNamedParameter("childElement"); if (childName == null) throw new InvalidModelException("Flat collections must specify the childElement attribute."); flatCollections.put(beanProperty.getName(), childName); } DocletTag flatPropTag = acc.getTagByName(FLAT_PROPERTY_ANNOTATION); if (flatPropTag != null) { flatProperties.add(beanProperty.getName()); } } } } } String initMethod = null; String destroyMethod = null; String factoryMethod = null; for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; if (method.isPublic() && !method.isConstructor()) { if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) { initMethod = method.getName(); } if (destroyMethod == null && method.getTagByName(DESTROY_METHOD_ANNOTATION) != null) { destroyMethod = method.getName(); } if (factoryMethod == null && method.getTagByName(FACTORY_METHOD_ANNOTATION) != null) { factoryMethod = method.getName(); } } } } List constructorArgs = new ArrayList(); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; JavaParameter[] parameters = method.getParameters(); if (isValidConstructor(factoryMethod, method, parameters)) { List args = new ArrayList(parameters.length); for (int j = 0; j < parameters.length; j++) { JavaParameter parameter = parameters[j]; AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName()); if (attributeMapping == null) { attributeMapping = loadParameter(parameter); attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null))); } constructorArgs.add(Collections.unmodifiableList(args)); } } HashSet interfaces = new HashSet(); interfaces.addAll( getFullyQulifiedNames( javaClass.getImplementedInterfaces() ) ); System.out.println("Checking: "+javaClass.getFullyQualifiedName()); ArrayList superClasses = new ArrayList(); JavaClass p = javaClass; while( true ) { JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break; } p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) ); } return new ElementMapping(namespace, element, javaClass.getFullyQualifiedName(), description, root, initMethod, destroyMethod, factoryMethod, contentProperty, attributes, constructorArgs, flatProperties, mapsByPropertyName, flatCollections, superClasses, interfaces); }
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"); if (description == null) { description = javaClass.getComment(); } String namespace = getProperty(xbeanTag, "namespace", defaultNamespace); boolean root = getBooleanProperty(xbeanTag, "rootElement"); String contentProperty = getProperty(xbeanTag, "contentProperty"); Map mapsByPropertyName = new HashMap(); List flatProperties = new ArrayList(); Map flatCollections = new HashMap(); Set attributes = new HashSet(); Map attributesByPropertyName = new HashMap(); for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { BeanProperty[] beanProperties = jClass.getBeanProperties(); for (int i = 0; i < beanProperties.length; i++) { BeanProperty beanProperty = beanProperties[i]; // we only care about properties with a setter if (beanProperty.getMutator() != null) { AttributeMapping attributeMapping = loadAttribute(beanProperty, ""); if (attributeMapping != null) { attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } JavaMethod acc = beanProperty.getAccessor(); if (acc != null) { DocletTag mapTag = acc.getTagByName(MAP_ANNOTATION); if (mapTag != null) { MapMapping mm = new MapMapping(mapTag.getNamedParameter("entryName"), mapTag.getNamedParameter("keyName")); mapsByPropertyName.put(beanProperty.getName(), mm); } DocletTag flatColTag = acc.getTagByName(FLAT_COLLECTION_ANNOTATION); if (flatColTag != null) { String childName = flatColTag.getNamedParameter("childElement"); if (childName == null) throw new InvalidModelException("Flat collections must specify the childElement attribute."); flatCollections.put(beanProperty.getName(), childName); } DocletTag flatPropTag = acc.getTagByName(FLAT_PROPERTY_ANNOTATION); if (flatPropTag != null) { flatProperties.add(beanProperty.getName()); } } } } } String initMethod = null; String destroyMethod = null; String factoryMethod = null; for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; if (method.isPublic() && !method.isConstructor()) { if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) { initMethod = method.getName(); } if (destroyMethod == null && method.getTagByName(DESTROY_METHOD_ANNOTATION) != null) { destroyMethod = method.getName(); } if (factoryMethod == null && method.getTagByName(FACTORY_METHOD_ANNOTATION) != null) { factoryMethod = method.getName(); } } } } List constructorArgs = new ArrayList(); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; JavaParameter[] parameters = method.getParameters(); if (isValidConstructor(factoryMethod, method, parameters)) { List args = new ArrayList(parameters.length); for (int j = 0; j < parameters.length; j++) { JavaParameter parameter = parameters[j]; AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName()); if (attributeMapping == null) { attributeMapping = loadParameter(parameter); attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null))); } constructorArgs.add(Collections.unmodifiableList(args)); } } HashSet interfaces = new HashSet(); interfaces.addAll( getFullyQulifiedNames( javaClass.getImplementedInterfaces() ) ); System.out.println("Checking: "+javaClass.getFullyQualifiedName()); ArrayList superClasses = new ArrayList(); JavaClass p = javaClass; while( true ) { JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break; } p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) ); } return new ElementMapping(namespace, element, javaClass.getFullyQualifiedName(), description, root, initMethod, destroyMethod, factoryMethod, contentProperty, attributes, constructorArgs, flatProperties, mapsByPropertyName, flatCollections, superClasses, interfaces); }
1,123,076
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"); if (description == null) { description = javaClass.getComment(); } String namespace = getProperty(xbeanTag, "namespace", defaultNamespace); boolean root = getBooleanProperty(xbeanTag, "rootElement"); String contentProperty = getProperty(xbeanTag, "contentProperty"); Map mapsByPropertyName = new HashMap(); List flatProperties = new ArrayList(); Map flatCollections = new HashMap(); Set attributes = new HashSet(); Map attributesByPropertyName = new HashMap(); for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { BeanProperty[] beanProperties = jClass.getBeanProperties(); for (int i = 0; i < beanProperties.length; i++) { BeanProperty beanProperty = beanProperties[i]; // we only care about properties with a setter if (beanProperty.getMutator() != null) { AttributeMapping attributeMapping = loadAttribute(beanProperty, ""); if (attributeMapping != null) { attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } JavaMethod acc = beanProperty.getAccessor(); if (acc != null) { DocletTag mapTag = acc.getTagByName(MAP_ANNOTATION); if (mapTag != null) { MapMapping mm = new MapMapping(mapTag.getNamedParameter("entryName"), mapTag.getNamedParameter("keyName")); mapsByPropertyName.put(beanProperty.getName(), mm); } DocletTag flatColTag = acc.getTagByName(FLAT_COLLECTION_ANNOTATION); if (flatColTag != null) { String childName = flatColTag.getNamedParameter("childElement"); if (childName == null) throw new InvalidModelException("Flat collections must specify the childElement attribute."); flatCollections.put(beanProperty.getName(), childName); } DocletTag flatPropTag = acc.getTagByName(FLAT_PROPERTY_ANNOTATION); if (flatPropTag != null) { flatProperties.add(beanProperty.getName()); } } } } } String initMethod = null; String destroyMethod = null; String factoryMethod = null; for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; if (method.isPublic() && !method.isConstructor()) { if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) { initMethod = method.getName(); } if (destroyMethod == null && method.getTagByName(DESTROY_METHOD_ANNOTATION) != null) { destroyMethod = method.getName(); } if (factoryMethod == null && method.getTagByName(FACTORY_METHOD_ANNOTATION) != null) { factoryMethod = method.getName(); } } } } List constructorArgs = new ArrayList(); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; JavaParameter[] parameters = method.getParameters(); if (isValidConstructor(factoryMethod, method, parameters)) { List args = new ArrayList(parameters.length); for (int j = 0; j < parameters.length; j++) { JavaParameter parameter = parameters[j]; AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName()); if (attributeMapping == null) { attributeMapping = loadParameter(parameter); attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null))); } constructorArgs.add(Collections.unmodifiableList(args)); } } HashSet interfaces = new HashSet(); interfaces.addAll( getFullyQulifiedNames( javaClass.getImplementedInterfaces() ) ); System.out.println("Checking: "+javaClass.getFullyQualifiedName()); ArrayList superClasses = new ArrayList(); JavaClass p = javaClass; while( true ) { JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break; } p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) ); } return new ElementMapping(namespace, element, javaClass.getFullyQualifiedName(), description, root, initMethod, destroyMethod, factoryMethod, contentProperty, attributes, constructorArgs, flatProperties, mapsByPropertyName, flatCollections, superClasses, interfaces); }
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"); if (description == null) { description = javaClass.getComment(); } String namespace = getProperty(xbeanTag, "namespace", defaultNamespace); boolean root = getBooleanProperty(xbeanTag, "rootElement"); String contentProperty = getProperty(xbeanTag, "contentProperty"); Map mapsByPropertyName = new HashMap(); List flatProperties = new ArrayList(); Map flatCollections = new HashMap(); Set attributes = new HashSet(); Map attributesByPropertyName = new HashMap(); for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { BeanProperty[] beanProperties = jClass.getBeanProperties(); for (int i = 0; i < beanProperties.length; i++) { BeanProperty beanProperty = beanProperties[i]; // we only care about properties with a setter if (beanProperty.getMutator() != null) { AttributeMapping attributeMapping = loadAttribute(beanProperty, ""); if (attributeMapping != null) { attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } JavaMethod acc = beanProperty.getAccessor(); if (acc != null) { DocletTag mapTag = acc.getTagByName(MAP_ANNOTATION); if (mapTag != null) { MapMapping mm = new MapMapping(mapTag.getNamedParameter("entryName"), mapTag.getNamedParameter("keyName")); mapsByPropertyName.put(beanProperty.getName(), mm); } DocletTag flatColTag = acc.getTagByName(FLAT_COLLECTION_ANNOTATION); if (flatColTag != null) { String childName = flatColTag.getNamedParameter("childElement"); if (childName == null) throw new InvalidModelException("Flat collections must specify the childElement attribute."); flatCollections.put(beanProperty.getName(), childName); } DocletTag flatPropTag = acc.getTagByName(FLAT_PROPERTY_ANNOTATION); if (flatPropTag != null) { flatProperties.add(beanProperty.getName()); } } } } } String initMethod = null; String destroyMethod = null; String factoryMethod = null; for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) { JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; if (method.isPublic() && !method.isConstructor()) { if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) { initMethod = method.getName(); } if (destroyMethod == null && method.getTagByName(DESTROY_METHOD_ANNOTATION) != null) { destroyMethod = method.getName(); } if (factoryMethod == null && method.getTagByName(FACTORY_METHOD_ANNOTATION) != null) { factoryMethod = method.getName(); } } } } List constructorArgs = new ArrayList(); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { JavaMethod method = methods[i]; JavaParameter[] parameters = method.getParameters(); if (isValidConstructor(factoryMethod, method, parameters)) { List args = new ArrayList(parameters.length); for (int j = 0; j < parameters.length; j++) { JavaParameter parameter = parameters[j]; AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName()); if (attributeMapping == null) { attributeMapping = loadParameter(parameter); attributes.add(attributeMapping); attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping); } args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null))); } constructorArgs.add(Collections.unmodifiableList(args)); } } HashSet interfaces = new HashSet(); interfaces.addAll( getFullyQulifiedNames( javaClass.getImplementedInterfaces() ) ); System.out.println("Checking: "+javaClass.getFullyQualifiedName()); ArrayList superClasses = new ArrayList(); JavaClass p = javaClass; while( true ) { JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break; } p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) ); } return new ElementMapping(namespace, element, javaClass.getFullyQualifiedName(), description, root, initMethod, destroyMethod, factoryMethod, contentProperty, attributes, constructorArgs, flatProperties, mapsByPropertyName, flatCollections, superClasses, interfaces); }
1,123,077
public ElementMapping(String namespace, String elementName, String className, String description, boolean rootElement, String initMethod, String destroyMethod, String factoryMethod, String contentProperty, Set attributes, List constructors, List flatProperties, Map maps, Map flatCollections) { if (namespace == null) throw new NullPointerException("namespace"); if (elementName == null) throw new NullPointerException("elementName"); if (className == null) throw new NullPointerException("className"); if (attributes == null) throw new NullPointerException("attributes"); if (constructors == null) throw new NullPointerException("constructors"); this.namespace = namespace; this.elementName = elementName; this.className = className; this.description = description; this.rootElement = rootElement; this.initMethod = initMethod; this.destroyMethod = destroyMethod; this.factoryMethod = factoryMethod; this.contentProperty = contentProperty; this.constructors = constructors; this.attributes = Collections.unmodifiableSet(new TreeSet(attributes)); this.maps = Collections.unmodifiableMap(maps); this.flatProperties = Collections.unmodifiableList(flatProperties); this.flatCollections = Collections.unmodifiableMap(flatCollections); Map attributesByName = new HashMap(); for (Iterator iterator = attributes.iterator(); iterator.hasNext();) { AttributeMapping attribute = (AttributeMapping) iterator.next(); attributesByName.put(attribute.getAttributeName(), attribute); } this.attributesByName = Collections.unmodifiableMap(attributesByName); }
public ElementMapping(String namespace, String elementName, String className, String description, boolean rootElement, String initMethod, String destroyMethod, String factoryMethod, String contentProperty, Set attributes, List constructors, List flatProperties, Map maps, Map flatCollections) { if (namespace == null) throw new NullPointerException("namespace"); if (elementName == null) throw new NullPointerException("elementName"); if (className == null) throw new NullPointerException("className"); if (attributes == null) throw new NullPointerException("attributes"); if (constructors == null) throw new NullPointerException("constructors"); this.namespace = namespace; this.elementName = elementName; this.className = className; this.description = description; this.rootElement = rootElement; this.initMethod = initMethod; this.destroyMethod = destroyMethod; this.factoryMethod = factoryMethod; this.contentProperty = contentProperty; this.constructors = constructors; this.attributes = Collections.unmodifiableSet(new TreeSet(attributes)); this.maps = Collections.unmodifiableMap(maps); this.flatProperties = Collections.unmodifiableList(flatProperties); this.flatCollections = Collections.unmodifiableMap(flatCollections); Map attributesByName = new HashMap(); for (Iterator iterator = attributes.iterator(); iterator.hasNext();) { AttributeMapping attribute = (AttributeMapping) iterator.next(); attributesByName.put(attribute.getAttributeName(), attribute); } this.attributesByName = Collections.unmodifiableMap(attributesByName); }
1,123,078
private UIComponent getCategoryEditor() { WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); if(categoriesUI==null){ //id on the component is set implicitly categoriesUI=new WebDAVCategories(); //we want to set the categories also on the parent ".article" folder: categoriesUI.setCategoriesOnParent(true); categoriesUI.setDisplaySaveButton(false); categoriesUI.setDisplayHeader(false); //categoriesUI.setId(CATEGORY_EDITOR_ID); FacesContext context = getFacesContext(); String setCategories = (String) context.getExternalContext().getRequestParameterMap().get(ContentItemToolbar.PARAMETER_CATEGORIES); if(setCategories!=null){ categoriesUI.setCategories(setCategories); } //Categories are set in encodeBegin: //if(!isInCreateMode()){ //there is no resourcepath set for the article if it's about to be created // categoriesUI.setResourcePath(resourcePath); //} //parent.getChildren().add(categoriesUI); } return categoriesUI; }
private UIComponent getCategoryEditor() { WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(CATEGORY_EDITOR_ID); if(categoriesUI==null){ //id on the component is set implicitly categoriesUI=new WebDAVCategories(); //we want to set the categories also on the parent ".article" folder: categoriesUI.setCategoriesOnParent(true); categoriesUI.setDisplaySaveButton(false); categoriesUI.setDisplayHeader(false); //categoriesUI.setId(CATEGORY_EDITOR_ID); FacesContext context = getFacesContext(); String setCategories = (String) context.getExternalContext().getRequestParameterMap().get(ContentItemToolbar.PARAMETER_CATEGORIES); if(setCategories!=null){ categoriesUI.setCategories(setCategories); } //Categories are set in encodeBegin: //if(!isInCreateMode()){ //there is no resourcepath set for the article if it's about to be created // categoriesUI.setResourcePath(resourcePath); //} //parent.getChildren().add(categoriesUI); } return categoriesUI; }
1,123,079
public void processAction(ActionEvent event) { String id = event.getComponent().getId(); UIComponent rootParent = rootParent = event.getComponent().getParent().getParent().getParent(); EditArticleView ab = (EditArticleView) rootParent.findComponent(EDIT_ARTICLE_BLOCK_ID); if (id.equals(SAVE_ID)) { //We have the save button pressed boolean saveSuccessful=false; saveSuccessful = ab.storeArticle(); if(saveSuccessful){ ArticleItemBean articleItemBean = getArticleItemBean(); String fileResourcePath = articleItemBean.getLocalizedArticle().getResourcePath(); WebDAVCategories categoriesUI = (WebDAVCategories) ab.getCategoryEditor(); if(categoriesUI!=null){ categoriesUI.setResourcePath(fileResourcePath); categoriesUI.saveCategoriesSettings(fileResourcePath, categoriesUI); } } clearOnInit=false; } else if (id.equals(DELETE_ID)) { //we are deleting ArticleItemBean articleItemBean = getArticleItemBean(); articleItemBean.delete(); WFUtil.addMessageVB(ab.findComponent(DELETE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, "delete_successful"); } /* else if (id.equals(FOR_REVIEW_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_READY_FOR_REVIEW); ab.storeArticle(); } else if (id.equals(PUBLISH_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_PUBLISHED); ab.storeArticle(); } else if (id.equals(REWRITE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_REWRITE); ab.storeArticle(); } else if (id.equals(REJECT_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_DELETED); ab.storeArticle(); } else if (id.equals(DELETE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_DELETED); ab.storeArticle(); } else if (id.equals(ADD_IMAGE_ID)) { ab.setEditView(FILE_UPLOAD_FORM_ID); } else if (id.equals(FILE_UPLOAD_CANCEL_ID)) { ab.setEditView(ARTICLE_EDITOR_ID); } else if (id.equals(FILE_UPLOAD_ID)) { ab.setEditView(ARTICLE_EDITOR_ID); } else if (id.equals(CaseListBean.CASE_ID)){ String itemId = WFUtil.getParameter(event.getComponent(), "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "addRelatedContentItem", new Integer(itemId)); ab.setEditView(ARTICLE_EDITOR_ID); }*/ }
public void processAction(ActionEvent event) { String id = event.getComponent().getId(); UIComponent rootParent = rootParent = event.getComponent().getParent().getParent().getParent(); EditArticleView ab = (EditArticleView) rootParent.findComponent(EDIT_ARTICLE_BLOCK_ID); if (id.equals(SAVE_ID)) { //We have the save button pressed boolean saveSuccessful=false; saveSuccessful = ab.storeArticle(); if(saveSuccessful){ ArticleItemBean articleItemBean = getArticleItemBean(); String fileResourcePath = articleItemBean.getLocalizedArticle().getResourcePath(); WebDAVCategories categoriesUI = (WebDAVCategories) ab.getCategoryEditor(); if(categoriesUI!=null){ categoriesUI.setResourcePath(fileResourcePath); categoriesUI.saveCategoriesSettings(); } } clearOnInit=false; } else if (id.equals(DELETE_ID)) { //we are deleting ArticleItemBean articleItemBean = getArticleItemBean(); articleItemBean.delete(); WFUtil.addMessageVB(ab.findComponent(DELETE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, "delete_successful"); } /* else if (id.equals(FOR_REVIEW_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_READY_FOR_REVIEW); ab.storeArticle(); } else if (id.equals(PUBLISH_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_PUBLISHED); ab.storeArticle(); } else if (id.equals(REWRITE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_REWRITE); ab.storeArticle(); } else if (id.equals(REJECT_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_DELETED); ab.storeArticle(); } else if (id.equals(DELETE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_DELETED); ab.storeArticle(); } else if (id.equals(ADD_IMAGE_ID)) { ab.setEditView(FILE_UPLOAD_FORM_ID); } else if (id.equals(FILE_UPLOAD_CANCEL_ID)) { ab.setEditView(ARTICLE_EDITOR_ID); } else if (id.equals(FILE_UPLOAD_ID)) { ab.setEditView(ARTICLE_EDITOR_ID); } else if (id.equals(CaseListBean.CASE_ID)){ String itemId = WFUtil.getParameter(event.getComponent(), "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "addRelatedContentItem", new Integer(itemId)); ab.setEditView(ARTICLE_EDITOR_ID); }*/ }
1,123,082
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); //String language = bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previously, so nothing has to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} }
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); //String language = bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previously, so nothing has to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} }
1,123,083
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); //String language = bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previously, so nothing has to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} }
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); //String language = bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previously, so nothing has to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} }
1,123,084
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); //String language = bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previously, so nothing has to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} }
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); //String language = bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previously, so nothing has to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = event.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} }
1,123,085
public void initialize() { // Create IQ Filter PacketFilter packetFilter = new PacketTypeFilter(IQ.class); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { IQ iq = (IQ)packet; // Handle Version Request if (iq instanceof Version && iq.getType() == IQ.Type.GET) { // Send Version Version version = new Version(); version.setName("Spark IM Client"); version.setOs(JiveInfo.getOS()); version.setVersion(JiveInfo.getVersion()); // Send back as a reply version.setPacketID(iq.getPacketID()); version.setType(IQ.Type.RESULT); version.setTo(iq.getFrom()); version.setFrom(iq.getTo()); SparkManager.getConnection().sendPacket(version); } // Send time else if (iq instanceof Time && iq.getType() == IQ.Type.GET) { Time time = new Time(); time.setPacketID(iq.getPacketID()); time.setFrom(iq.getTo()); time.setTo(iq.getFrom()); time.setTime(new Date()); time.setType(IQ.Type.RESULT); // Send Time SparkManager.getConnection().sendPacket(time); } } }, packetFilter); final ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("Ctrl F11"), "viewClient"); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(final Object component, JPopupMenu popup) { if (!(component instanceof ContactItem)) { return; } Action versionRequest = new AbstractAction() { public void actionPerformed(ActionEvent e) { viewClient(); } }; versionRequest.putValue(Action.NAME, Res.getString("menuitem.view.client.version")); popup.add(versionRequest); } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); contactList.getActionMap().put("viewClient", new AbstractAction("viewClient") { public void actionPerformed(ActionEvent evt) { viewClient(); } }); }
public void initialize() { // Create IQ Filter PacketFilter packetFilter = new PacketTypeFilter(IQ.class); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { IQ iq = (IQ)packet; // Handle Version Request if (iq instanceof Version && iq.getType() == IQ.Type.GET) { // Send Version Version version = new Version(); version.setName("Spark IM Client"); version.setOs(JiveInfo.getOS()); version.setVersion(JiveInfo.getVersion()); // Send back as a reply version.setPacketID(iq.getPacketID()); version.setType(IQ.Type.RESULT); version.setTo(iq.getFrom()); version.setFrom(iq.getTo()); SparkManager.getConnection().sendPacket(version); } // Send time else if (iq instanceof Time && iq.getType() == IQ.Type.GET) { Time time = new Time(); time.setPacketID(iq.getPacketID()); time.setFrom(iq.getTo()); time.setTo(iq.getFrom()); time.setTime(new Date()); time.setType(IQ.Type.RESULT); // Send Time SparkManager.getConnection().sendPacket(time); } } }, packetFilter); final ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control F11"), "viewClient"); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(final Object component, JPopupMenu popup) { if (!(component instanceof ContactItem)) { return; } Action versionRequest = new AbstractAction() { public void actionPerformed(ActionEvent e) { viewClient(); } }; versionRequest.putValue(Action.NAME, Res.getString("menuitem.view.client.version")); popup.add(versionRequest); } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); contactList.getActionMap().put("viewClient", new AbstractAction("viewClient") { public void actionPerformed(ActionEvent evt) { viewClient(); } }); }
1,123,087
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNotNull(serviceMonitor.unregistered); }
private void destroy(StopStrategy stopStrategy) { ServiceState initialState = serviceManager.getState(); serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNotNull(serviceMonitor.unregistered); }
1,123,089
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNotNull(serviceMonitor.unregistered); }
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); kernel.reset(); try { serviceManager.destroy(stopStrategy); } catch (IllegalServiceStateException e) { assertFalse(stopCondition.satisfied); assertSame(StopStrategies.ASYNCHRONOUS, stopStrategy); } catch (UnsatisfiedConditionsException e) { assertFalse(stopCondition.satisfied); assertSame(StopStrategies.SYNCHRONOUS, stopStrategy); assertTrue(e.getUnsatisfiedConditions().contains(stopCondition)); } assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNotNull(serviceMonitor.unregistered); }
1,123,090
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNotNull(serviceMonitor.unregistered); }
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNotNull(serviceMonitor.unregistered); }
1,123,091
private void disabledStart(StartStrategy startStrategy) throws Exception { serviceFactory.setEnabled(false); try { serviceManager.start(false, startStrategy); fail("A disabled service should throw an IllegalServiceStateException from start"); } catch (IllegalServiceStateException e) { // expected } // move to starting disable, move to running, and try to restart serviceFactory.setEnabled(true); startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); serviceFactory.setEnabled(false);// try {// start(false, startStrategy);// } catch (IllegalServiceStateException e) {// assertTrue(startStrategy == StartStrategies.UNREGISTER);// } catch (UnsatisfiedConditionsException e) {// assertTrue(startStrategy == StartStrategies.SYNCHRONOUS);// assertTrue(e.getUnsatisfiedConditions().contains(startCondition));// } catch (UnregisterServiceException e) {// assertEquals(StartStrategies.UNREGISTER, startStrategy);// UnsatisfiedConditionsException cause = (UnsatisfiedConditionsException) e.getCause();// assertTrue(cause.getUnsatisfiedConditions().contains(startCondition));// } startCondition.satisfied = true; try { start(false, startStrategy); } catch (IllegalServiceStateException e) { assertTrue(startStrategy == StartStrategies.UNREGISTER); } try { start(false, startStrategy); } catch (IllegalServiceStateException e) { assertTrue(startStrategy == StartStrategies.UNREGISTER); } stop(StopStrategies.ASYNCHRONOUS); try { serviceManager.start(false, startStrategy); fail("A disabled service should throw an IllegalServiceStateException from start"); } catch (IllegalServiceStateException e) { // expected } }
private void disabledStart(StartStrategy startStrategy) throws Exception { serviceFactory.setEnabled(false); try { serviceManager.start(false, startStrategy); fail("A disabled service should throw an IllegalServiceStateException from start"); } catch (IllegalServiceStateException e) { // expected } // move to starting disable, move to running, and try to restart serviceFactory.setEnabled(true); startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); serviceFactory.setEnabled(false);// try {// start(false, startStrategy);// } catch (IllegalServiceStateException e) {// assertTrue(startStrategy == StartStrategies.UNREGISTER);// } catch (UnsatisfiedConditionsException e) {// assertTrue(startStrategy == StartStrategies.SYNCHRONOUS);// assertTrue(e.getUnsatisfiedConditions().contains(startCondition));// } catch (UnregisterServiceException e) {// assertEquals(StartStrategies.UNREGISTER, startStrategy);// UnsatisfiedConditionsException cause = (UnsatisfiedConditionsException) e.getCause();// assertTrue(cause.getUnsatisfiedConditions().contains(startCondition));// } startCondition.satisfied = true; try { start(false, startStrategy); } catch (IllegalServiceStateException e) { assertTrue(startStrategy == StartStrategies.UNREGISTER); } try { start(false, startStrategy); } catch (IllegalServiceStateException e) { assertTrue(startStrategy == StartStrategies.UNREGISTER); } stop(StopStrategies.ASYNCHRONOUS); try { serviceManager.start(false, startStrategy); fail("A disabled service should throw an IllegalServiceStateException from start"); } catch (IllegalServiceStateException e) { // expected } }
1,123,092
private void initialize() throws Exception { serviceMonitor.reset(); serviceManager.initialize(); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNotNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); }
private void initialize() throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); kernel.reset(); try { serviceManager.initialize(); } catch (MockCreateException e) { assertTrue(serviceFactory.throwExceptionFromCreate == true); assertSame(serviceFactory.createException, e); } catch (UnsatisfiedConditionsException e) { assertTrue(startCondition.satisfied == false); assertTrue(e.getUnsatisfiedConditions().contains(startCondition)); } catch (IllegalServiceStateException e) { assertFalse(serviceFactory.isEnabled()); } assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNotNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); }
1,123,093
private void initialize() throws Exception { serviceMonitor.reset(); serviceManager.initialize(); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNotNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); }
private void initialize() throws Exception { serviceMonitor.reset(); serviceManager.initialize(); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired assertNotNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); }
1,123,094
private void startException(StartStrategy startStrategy) throws Exception { serviceFactory.throwExceptionFromCreate = true; try { start(false, startStrategy); } catch (MockCreateException e) { assertTrue(startStrategy == StartStrategies.SYNCHRONOUS || startStrategy == StartStrategies.BLOCK); assertEquals(serviceFactory.createException, e); } catch (UnregisterServiceException e) { assertEquals(StartStrategies.UNREGISTER, startStrategy); assertSame(serviceFactory.createException, e.getCause()); } stop(StopStrategies.SYNCHRONOUS); }
private void startException(StartStrategy startStrategy, boolean recursive) throws Exception { serviceFactory.throwExceptionFromCreate = true; try { start(false, startStrategy); } catch (MockCreateException e) { assertTrue(startStrategy == StartStrategies.SYNCHRONOUS || startStrategy == StartStrategies.BLOCK); assertEquals(serviceFactory.createException, e); } catch (UnregisterServiceException e) { assertEquals(StartStrategies.UNREGISTER, startStrategy); assertSame(serviceFactory.createException, e.getCause()); } stop(StopStrategies.SYNCHRONOUS); }
1,123,095
private void startException(StartStrategy startStrategy) throws Exception { serviceFactory.throwExceptionFromCreate = true; try { start(false, startStrategy); } catch (MockCreateException e) { assertTrue(startStrategy == StartStrategies.SYNCHRONOUS || startStrategy == StartStrategies.BLOCK); assertEquals(serviceFactory.createException, e); } catch (UnregisterServiceException e) { assertEquals(StartStrategies.UNREGISTER, startStrategy); assertSame(serviceFactory.createException, e.getCause()); } stop(StopStrategies.SYNCHRONOUS); }
private void startException(StartStrategy startStrategy) throws Exception { serviceFactory.throwExceptionFromCreate = true; try { start(recursive, startStrategy); } catch (MockCreateException e) { assertTrue(startStrategy == StartStrategies.SYNCHRONOUS || startStrategy == StartStrategies.BLOCK); assertEquals(serviceFactory.createException, e); } catch (UnregisterServiceException e) { assertEquals(StartStrategies.UNREGISTER, startStrategy); assertSame(serviceFactory.createException, e.getCause()); } stop(StopStrategies.SYNCHRONOUS); }
1,123,096
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); start(false, startStrategy); start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); stop(StopStrategies.SYNCHRONOUS); }
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); start(false, startStrategy); start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); stop(StopStrategies.SYNCHRONOUS); }
1,123,097
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); start(false, startStrategy); start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); stop(StopStrategies.SYNCHRONOUS); }
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); start(false, startStrategy); start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); stop(StopStrategies.SYNCHRONOUS); }
1,123,098
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); // these events should never fire in response to start assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); if (initialState == ServiceState.STOPPED) { // // We were alredy stopped so nothing should have happened // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods assertFalse(stopCondition.initializeCalled); assertFalse(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!stopCondition.satisfied) { // // waiting to stop // assertSame(ServiceState.STOPPING, serviceManager.getState()); assertTrue(serviceManager.getStartTime() > 0); assertSame(SERVICE, serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNotNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.waitingToStop.getEventId()); } // our condition should be in the unsatisfied condition list assertNotNull(serviceMonitor.waitingToStop.getUnsatisfiedConditions()); assertTrue(serviceMonitor.waitingToStop.getUnsatisfiedConditions().contains(stopCondition)); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!serviceFactory.throwExceptionFromDestroy) { // // Normal transition to STOPPED from either STARTING, RUNNING or STOPPING // assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.STOPPING) { assertFalse(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } else { assertTrue(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } } else { // // Throw an exception from the destroy method // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNotNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else { assertEquals(serviceMonitor.stopError.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // verify that the exception is in the reson field assertSame(serviceFactory.destroyException, serviceMonitor.stopError.getCause()); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } }
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); // these events should never fire in response to start assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); if (initialState == ServiceState.STOPPED) { // // We were alredy stopped so nothing should have happened // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods assertFalse(stopCondition.initializeCalled); assertFalse(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!stopCondition.satisfied && stopStrategy != StopStrategies.FORCE) { // // waiting to stop // assertSame(ServiceState.STOPPING, serviceManager.getState()); assertTrue(serviceManager.getStartTime() > 0); assertSame(SERVICE, serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNotNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.waitingToStop.getEventId()); } // our condition should be in the unsatisfied condition list assertNotNull(serviceMonitor.waitingToStop.getUnsatisfiedConditions()); assertTrue(serviceMonitor.waitingToStop.getUnsatisfiedConditions().contains(stopCondition)); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!serviceFactory.throwExceptionFromDestroy) { // // Normal transition to STOPPED from either STARTING, RUNNING or STOPPING // assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.STOPPING) { assertFalse(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } else { assertTrue(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } } else { // // Throw an exception from the destroy method // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNotNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else { assertEquals(serviceMonitor.stopError.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // verify that the exception is in the reson field assertSame(serviceFactory.destroyException, serviceMonitor.stopError.getCause()); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } }
1,123,099
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); // these events should never fire in response to start assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); if (initialState == ServiceState.STOPPED) { // // We were alredy stopped so nothing should have happened // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods assertFalse(stopCondition.initializeCalled); assertFalse(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!stopCondition.satisfied) { // // waiting to stop // assertSame(ServiceState.STOPPING, serviceManager.getState()); assertTrue(serviceManager.getStartTime() > 0); assertSame(SERVICE, serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNotNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.waitingToStop.getEventId()); } // our condition should be in the unsatisfied condition list assertNotNull(serviceMonitor.waitingToStop.getUnsatisfiedConditions()); assertTrue(serviceMonitor.waitingToStop.getUnsatisfiedConditions().contains(stopCondition)); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!serviceFactory.throwExceptionFromDestroy) { // // Normal transition to STOPPED from either STARTING, RUNNING or STOPPING // assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.STOPPING) { assertFalse(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } else { assertTrue(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } } else { // // Throw an exception from the destroy method // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNotNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else { assertEquals(serviceMonitor.stopError.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // verify that the exception is in the reson field assertSame(serviceFactory.destroyException, serviceMonitor.stopError.getCause()); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } }
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); // these events should never fire in response to start assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); if (initialState == ServiceState.STOPPED) { // // We were alredy stopped so nothing should have happened // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); if (stopStrategy == StopStrategies.FORCE) { assertNotNull(serviceMonitor.stopError); ForcedStopException cause = (ForcedStopException) serviceMonitor.stopError.getCause(); assertTrue(cause.getUnsatisfiedConditions().contains(stopCondition)); } else { assertNull(serviceMonitor.stopError); } assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods assertFalse(stopCondition.initializeCalled); assertFalse(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!stopCondition.satisfied) { // // waiting to stop // assertSame(ServiceState.STOPPING, serviceManager.getState()); assertTrue(serviceManager.getStartTime() > 0); assertSame(SERVICE, serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNotNull(serviceMonitor.waitingToStop); if (stopStrategy == StopStrategies.FORCE) { assertNotNull(serviceMonitor.stopError); ForcedStopException cause = (ForcedStopException) serviceMonitor.stopError.getCause(); assertTrue(cause.getUnsatisfiedConditions().contains(stopCondition)); } else { assertNull(serviceMonitor.stopError); } assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.waitingToStop.getEventId()); } // our condition should be in the unsatisfied condition list assertNotNull(serviceMonitor.waitingToStop.getUnsatisfiedConditions()); assertTrue(serviceMonitor.waitingToStop.getUnsatisfiedConditions().contains(stopCondition)); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!serviceFactory.throwExceptionFromDestroy) { // // Normal transition to STOPPED from either STARTING, RUNNING or STOPPING // assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); if (stopStrategy == StopStrategies.FORCE) { assertNotNull(serviceMonitor.stopError); ForcedStopException cause = (ForcedStopException) serviceMonitor.stopError.getCause(); assertTrue(cause.getUnsatisfiedConditions().contains(stopCondition)); } else { assertNull(serviceMonitor.stopError); } assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.STOPPING) { assertFalse(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } else { assertTrue(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } } else { // // Throw an exception from the destroy method // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNotNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else { assertEquals(serviceMonitor.stopError.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // verify that the exception is in the reson field assertSame(serviceFactory.destroyException, serviceMonitor.stopError.getCause()); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } }
1,123,100
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); // these events should never fire in response to start assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); if (initialState == ServiceState.STOPPED) { // // We were alredy stopped so nothing should have happened // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods assertFalse(stopCondition.initializeCalled); assertFalse(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!stopCondition.satisfied) { // // waiting to stop // assertSame(ServiceState.STOPPING, serviceManager.getState()); assertTrue(serviceManager.getStartTime() > 0); assertSame(SERVICE, serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNotNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.waitingToStop.getEventId()); } // our condition should be in the unsatisfied condition list assertNotNull(serviceMonitor.waitingToStop.getUnsatisfiedConditions()); assertTrue(serviceMonitor.waitingToStop.getUnsatisfiedConditions().contains(stopCondition)); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!serviceFactory.throwExceptionFromDestroy) { // // Normal transition to STOPPED from either STARTING, RUNNING or STOPPING // assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.STOPPING) { assertFalse(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } else { assertTrue(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } } else { // // Throw an exception from the destroy method // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNotNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else { assertEquals(serviceMonitor.stopError.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // verify that the exception is in the reson field assertSame(serviceFactory.destroyException, serviceMonitor.stopError.getCause()); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } }
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); // these events should never fire in response to start assertNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNull(serviceMonitor.running); if (initialState == ServiceState.STOPPED) { // // We were alredy stopped so nothing should have happened // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNull(serviceMonitor.stopping); assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods assertFalse(stopCondition.initializeCalled); assertFalse(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!stopCondition.satisfied) { // // waiting to stop // assertSame(ServiceState.STOPPING, serviceManager.getState()); assertTrue(serviceManager.getStartTime() > 0); assertSame(SERVICE, serviceManager.getService()); // verify expected events fired if (stopStrategy == StopStrategies.FORCE) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNotNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (stopStrategy == StopStrategies.FORCE) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.waitingToStop.getEventId()); } // our condition should be in the unsatisfied condition list assertNotNull(serviceMonitor.waitingToStop.getUnsatisfiedConditions()); assertTrue(serviceMonitor.waitingToStop.getUnsatisfiedConditions().contains(stopCondition)); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertFalse(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertFalse(stopCondition.destroyCalled); } else if (!serviceFactory.throwExceptionFromDestroy) { // // Normal transition to STOPPED from either STARTING, RUNNING or STOPPING // assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); // verify expected events fired if (stopStrategy == StopStrategies.FORCE) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (stopStrategy == StopStrategies.FORCE) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.STOPPING) { assertFalse(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } else { assertTrue(stopCondition.initializeCalled); assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } } else { // // Throw an exception from the destroy method // assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); // verify expected events fired if (stopStrategy == StopStrategies.FORCE) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else if (initialState != ServiceState.STOPPING) { assertNotNull(serviceMonitor.stopping); } assertNull(serviceMonitor.waitingToStop); assertNotNull(serviceMonitor.stopError); assertNotNull(serviceMonitor.stopped); assertNull(serviceMonitor.unregistered); // verify events fired in the correct order if (stopStrategy == StopStrategies.FORCE) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else if (initialState != ServiceState.STOPPING) { assertEquals(serviceMonitor.stopping.getEventId() + 1, serviceMonitor.stopError.getEventId()); assertEquals(serviceMonitor.stopping.getEventId() + 2, serviceMonitor.stopped.getEventId()); } else { assertEquals(serviceMonitor.stopError.getEventId() + 1, serviceMonitor.stopped.getEventId()); } // verify that the exception is in the reson field assertSame(serviceFactory.destroyException, serviceMonitor.stopError.getCause()); // start condition methods assertFalse(startCondition.initializeCalled); assertFalse(startCondition.isSatisfiedCalled); assertTrue(startCondition.destroyCalled); // stop condition methods if (initialState == ServiceState.RUNNING) { assertTrue(stopCondition.initializeCalled); } else { assertFalse(stopCondition.initializeCalled); } assertTrue(stopCondition.isSatisfiedCalled); assertTrue(stopCondition.destroyCalled); } }
1,123,101
public void testInitializeDestroy() throws Exception { initialize(); destroy(); initialize(); destroy(); }
public void testInitializeDestroy() throws Exception { initialize(); destroy(StopStrategies.SYNCHRONOUS); initialize(); destroy(StopStrategies.SYNCHRONOUS); }
1,123,102
public void testStartException() throws Exception { startException(StartStrategies.ASYNCHRONOUS); startException(StartStrategies.SYNCHRONOUS); startException(StartStrategies.UNREGISTER); startException(StartStrategies.BLOCK); startException(StartStrategies.ASYNCHRONOUS); startException(StartStrategies.SYNCHRONOUS); startException(StartStrategies.UNREGISTER); startException(StartStrategies.BLOCK); }
public void testStartException() throws Exception { startException(StartStrategies.ASYNCHRONOUS); startException(StartStrategies.SYNCHRONOUS); startException(StartStrategies.UNREGISTER); startException(StartStrategies.BLOCK); startException(StartStrategies.ASYNCHRONOUS); startException(StartStrategies.SYNCHRONOUS); startException(StartStrategies.UNREGISTER); startException(StartStrategies.BLOCK); }
1,123,103
public void testStartRecursive() throws Exception { startRecursive(StartStrategies.ASYNCHRONOUS); startRecursive(StartStrategies.SYNCHRONOUS); startRecursive(StartStrategies.UNREGISTER); startRecursive(StartStrategies.BLOCK); startRecursive(StartStrategies.ASYNCHRONOUS); startRecursive(StartStrategies.SYNCHRONOUS); startRecursive(StartStrategies.UNREGISTER); startRecursive(StartStrategies.BLOCK); }
public void testStartRecursive() throws Exception { startRecursive(StartStrategies.ASYNCHRONOUS); startRecursive(StartStrategies.SYNCHRONOUS); startRecursive(StartStrategies.UNREGISTER); startRecursive(StartStrategies.BLOCK); startRecursive(StartStrategies.ASYNCHRONOUS); startRecursive(StartStrategies.SYNCHRONOUS); startRecursive(StartStrategies.UNREGISTER); startRecursive(StartStrategies.BLOCK); }
1,123,104
public void testStartStop() throws Exception { startStop(StartStrategies.ASYNCHRONOUS); startStop(StartStrategies.SYNCHRONOUS); startStop(StartStrategies.UNREGISTER); startStop(StartStrategies.BLOCK); startStop(StartStrategies.ASYNCHRONOUS); startStop(StartStrategies.SYNCHRONOUS); startStop(StartStrategies.UNREGISTER); startStop(StartStrategies.BLOCK); }
public void testStartStop() throws Exception { startStop(StartStrategies.ASYNCHRONOUS); startStop(StartStrategies.SYNCHRONOUS); startStop(StartStrategies.UNREGISTER); startStop(StartStrategies.BLOCK); startStop(StartStrategies.ASYNCHRONOUS); startStop(StartStrategies.SYNCHRONOUS); startStop(StartStrategies.UNREGISTER); startStop(StartStrategies.BLOCK); }
1,123,105
public void testStartWaiting() throws Exception { startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); }
public void testStartWaiting() throws Exception { startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); }
1,123,106
public void testStartWaiting() throws Exception { startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); }
public void testStartWaiting() throws Exception { startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); }
1,123,107
public void testStartWaitingStart() throws Exception { startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); startCondition.satisfied = true; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); startCondition.satisfied = true; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); }
public void testStartWaitingStart() throws Exception { startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); startCondition.satisfied = true; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); startCondition.satisfied = false; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); startCondition.satisfied = true; start(false, StartStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); }
1,123,108
public void testWaitingStop() throws Exception { start(false, StartStrategies.ASYNCHRONOUS); stopCondition.satisfied = false; stop(StopStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); stopCondition.satisfied = true; stop(StopStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stopCondition.satisfied = false; stop(StopStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); stopCondition.satisfied = true; stop(StopStrategies.ASYNCHRONOUS); }
public void testWaitingStop() throws Exception { start(false, StartStrategies.ASYNCHRONOUS); stopCondition.satisfied = false; stop(StopStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); stopCondition.satisfied = true; stop(StopStrategies.ASYNCHRONOUS); start(false, StartStrategies.ASYNCHRONOUS); stopCondition.satisfied = false; stop(StopStrategies.ASYNCHRONOUS); stop(StopStrategies.ASYNCHRONOUS); stopCondition.satisfied = true; stop(StopStrategies.ASYNCHRONOUS); }
1,123,109
private void configureMenu() { // setup file menu JMenuItem exitMenuItem = new JMenuItem("Exit"); // Setup ResourceUtils ResourceUtils.resButton(connectMenu, "&" + Default.getString(Default.APPLICATION_NAME)); ResourceUtils.resButton(contactsMenu, "Con&tacts"); ResourceUtils.resButton(actionsMenu, "&Actions"); ResourceUtils.resButton(exitMenuItem, "&Exit"); ResourceUtils.resButton(pluginsMenu, "&Plugins"); exitMenuItem.setIcon(null); mainWindowBar.add(connectMenu); mainWindowBar.add(contactsMenu); mainWindowBar.add(actionsMenu); //mainWindowBar.add(pluginsMenu); mainWindowBar.add(helpMenu); preferenceMenuItem = new JMenuItem(SparkRes.getImageIcon(SparkRes.PREFERENCES_IMAGE)); preferenceMenuItem.setText("Spark Preferences"); preferenceMenuItem.addActionListener(this); connectMenu.add(preferenceMenuItem); connectMenu.addSeparator(); JMenuItem logoutMenuItem = new JMenuItem("Log Out"); ResourceUtils.resButton(logoutMenuItem, "L&og Out"); logoutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { logout(false); } }); JMenuItem logoutWithStatus = new JMenuItem("Log Out"); ResourceUtils.resButton(logoutWithStatus, "Log out with status"); logoutWithStatus.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { logout(true); } }); if (Spark.isWindows()) { connectMenu.add(logoutMenuItem); connectMenu.add(logoutWithStatus); } connectMenu.addSeparator(); connectMenu.add(exitMenuItem); Action showTrafficAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { EnhancedDebuggerWindow window = EnhancedDebuggerWindow.getInstance(); window.setVisible(true); } }; showTrafficAction.putValue(Action.NAME, "Show Traffic Window"); showTrafficAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.TRAFFIC_LIGHT_IMAGE)); Action updateAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { checkUpdate(true); } }; updateAction.putValue(Action.NAME, "Check For Updates"); updateAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.DOWNLOAD_16x16)); // Build Help Menu helpMenu.setText("Help"); //s helpMenu.add(helpMenuItem); helpMenu.add(showTrafficAction); helpMenu.add(updateAction); helpMenu.addSeparator(); helpMenu.add(menuAbout); // ResourceUtils - Adds mnemonics ResourceUtils.resButton(preferenceMenuItem, "&Preferences"); ResourceUtils.resButton(helpMenu, "&Help"); ResourceUtils.resButton(menuAbout, "&About"); ResourceUtils.resButton(helpMenuItem, "&Online Help"); // Register shutdown with the exit menu. exitMenuItem.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { shutdown(); } }); helpMenuItem.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { try { BrowserLauncher.openURL("http://www.jivesoftware.org/community/kbcategory.jspa?categoryID=23"); } catch (IOException browserException) { Log.error("Error launching browser:", browserException); } } }); // Show About Box menuAbout.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { showAboutBox(); } }); int delay = 15000; // 15 sec Date timeToRun = new Date(System.currentTimeMillis() + delay); Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { checkUpdate(false); } }, timeToRun); }
private void configureMenu() { // setup file menu JMenuItem exitMenuItem = new JMenuItem("Exit"); // Setup ResourceUtils ResourceUtils.resButton(connectMenu, "&" + Default.getString(Default.APPLICATION_NAME)); ResourceUtils.resButton(contactsMenu, "Con&tacts"); ResourceUtils.resButton(actionsMenu, "&Actions"); ResourceUtils.resButton(exitMenuItem, "&Exit"); ResourceUtils.resButton(pluginsMenu, "&Plugins"); exitMenuItem.setIcon(null); mainWindowBar.add(connectMenu); mainWindowBar.add(contactsMenu); mainWindowBar.add(actionsMenu); //mainWindowBar.add(pluginsMenu); mainWindowBar.add(helpMenu); preferenceMenuItem = new JMenuItem(SparkRes.getImageIcon(SparkRes.PREFERENCES_IMAGE)); preferenceMenuItem.setText("Spark Preferences"); preferenceMenuItem.addActionListener(this); connectMenu.add(preferenceMenuItem); connectMenu.addSeparator(); JMenuItem logoutMenuItem = new JMenuItem("Log Out"); ResourceUtils.resButton(logoutMenuItem, "L&og Out"); logoutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { logout(false); } }); JMenuItem logoutWithStatus = new JMenuItem("Log Out"); ResourceUtils.resButton(logoutWithStatus, "Log Out with &status"); logoutWithStatus.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { logout(true); } }); if (Spark.isWindows()) { connectMenu.add(logoutMenuItem); connectMenu.add(logoutWithStatus); } connectMenu.addSeparator(); connectMenu.add(exitMenuItem); Action showTrafficAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { EnhancedDebuggerWindow window = EnhancedDebuggerWindow.getInstance(); window.setVisible(true); } }; showTrafficAction.putValue(Action.NAME, "Show Traffic Window"); showTrafficAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.TRAFFIC_LIGHT_IMAGE)); Action updateAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { checkUpdate(true); } }; updateAction.putValue(Action.NAME, "Check For Updates"); updateAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.DOWNLOAD_16x16)); // Build Help Menu helpMenu.setText("Help"); //s helpMenu.add(helpMenuItem); helpMenu.add(showTrafficAction); helpMenu.add(updateAction); helpMenu.addSeparator(); helpMenu.add(menuAbout); // ResourceUtils - Adds mnemonics ResourceUtils.resButton(preferenceMenuItem, "&Preferences"); ResourceUtils.resButton(helpMenu, "&Help"); ResourceUtils.resButton(menuAbout, "&About"); ResourceUtils.resButton(helpMenuItem, "&Online Help"); // Register shutdown with the exit menu. exitMenuItem.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { shutdown(); } }); helpMenuItem.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { try { BrowserLauncher.openURL("http://www.jivesoftware.org/community/kbcategory.jspa?categoryID=23"); } catch (IOException browserException) { Log.error("Error launching browser:", browserException); } } }); // Show About Box menuAbout.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { showAboutBox(); } }); int delay = 15000; // 15 sec Date timeToRun = new Date(System.currentTimeMillis() + delay); Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { checkUpdate(false); } }, timeToRun); }
1,123,110
public String getInput(String title, String description, Icon icon, Component parent) { textArea = new JTextArea(); subjectField = new JTextField(); textArea.setLineWrap(true); TitlePanel titlePanel = new TitlePanel(title, description, icon, true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); final JPanel centerPanel = new JPanel(new GridBagLayout()); // The user should only be able to close this dialog. final Object[] options = {"Ok", "Cancel"}; optionPane = new JOptionPane(new JScrollPane(textArea), JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(optionPane, BorderLayout.CENTER); // Let's make sure that the dialog is modal. Cannot risk people // losing this dialog. JOptionPane p = new JOptionPane(); dialog = p.createDialog(parent, title); dialog.setModal(true); dialog.pack(); dialog.setSize(width, height); dialog.setContentPane(mainPanel); dialog.setLocationRelativeTo(parent); optionPane.addPropertyChangeListener(this); // Add Key Listener to Send Field textArea.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_TAB) { optionPane.requestFocus(); } else if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { dialog.dispose(); } } }); textArea.requestFocus(); dialog.setVisible(true); return stringValue; }
public String getInput(String title, String description, Icon icon, Component parent) { textArea = new JTextArea(); subjectField = new JTextField(); textArea.setLineWrap(true); TitlePanel titlePanel = new TitlePanel(title, description, icon, true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); final JPanel centerPanel = new JPanel(new GridBagLayout()); // The user should only be able to close this dialog. final Object[] options = {"Ok", "Cancel"}; optionPane = new JOptionPane(new JScrollPane(textArea), JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(optionPane, BorderLayout.CENTER); // Let's make sure that the dialog is modal. Cannot risk people // losing this dialog. JOptionPane p = new JOptionPane(); dialog = p.createDialog(parent, title); dialog.setModal(true); dialog.pack(); dialog.setSize(width, height); dialog.setContentPane(mainPanel); dialog.setLocationRelativeTo(parent); optionPane.addPropertyChangeListener(this); // Add Key Listener to Send Field textArea.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_TAB) { optionPane.requestFocus(); } else if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { dialog.dispose(); } } }); textArea.requestFocus(); dialog.setVisible(true); return stringValue; }
1,123,111
public String getInput(String title, String description, Icon icon, Component parent) { textArea = new JTextArea(); subjectField = new JTextField(); textArea.setLineWrap(true); TitlePanel titlePanel = new TitlePanel(title, description, icon, true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); final JPanel centerPanel = new JPanel(new GridBagLayout()); // The user should only be able to close this dialog. final Object[] options = {"Ok", "Cancel"}; optionPane = new JOptionPane(new JScrollPane(textArea), JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(optionPane, BorderLayout.CENTER); // Let's make sure that the dialog is modal. Cannot risk people // losing this dialog. JOptionPane p = new JOptionPane(); dialog = p.createDialog(parent, title); dialog.setModal(true); dialog.pack(); dialog.setSize(width, height); dialog.setContentPane(mainPanel); dialog.setLocationRelativeTo(parent); optionPane.addPropertyChangeListener(this); // Add Key Listener to Send Field textArea.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_TAB) { optionPane.requestFocus(); } else if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { dialog.dispose(); } } }); textArea.requestFocus(); dialog.setVisible(true); return stringValue; }
public String getInput(String title, String description, Icon icon, Component parent) { textArea = new JTextArea(); subjectField = new JTextField(); textArea.setLineWrap(true); TitlePanel titlePanel = new TitlePanel(title, description, icon, true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); final JPanel centerPanel = new JPanel(new GridBagLayout()); // The user should only be able to close this dialog. final Object[] options = {"Ok", "Cancel"}; optionPane = new JOptionPane(new JScrollPane(textArea), JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(optionPane, BorderLayout.CENTER); // Let's make sure that the dialog is modal. Cannot risk people // losing this dialog. JOptionPane p = new JOptionPane(); dialog = p.createDialog(parent, title); dialog.setModal(true); dialog.pack(); dialog.setSize(width, height); dialog.setContentPane(mainPanel); dialog.setLocationRelativeTo(parent); optionPane.addPropertyChangeListener(this); // Add Key Listener to Send Field textArea.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_TAB) { optionPane.requestFocus(); } else if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { dialog.dispose(); } } }); textArea.requestFocus(); dialog.setVisible(true); return stringValue; }
1,123,112
public final void parse() throws IOException, TemplateException { // thread policy: // // unsynchronized code elsewhere will access _content. We must // ensure that any data copied into _content is ready for public // use--which means dealing with two subtle issues. First, the Block // created by this method must be written back to main memory BEFORE // being referenced by _content. Second, once we add it to _content, // our copy of _content has to be copied back to main memory as well. // // Therefore we synchronize around the access to _content so as to // accomplish both these things. newContent will be written to main // memory at the start of the synchronized block, and _content will // be written to main memory at the close. Block newContent = null; Map newParameters = null; Reader source = null; Map newFilters = null; try { Parser parser = getParser(); Reader in = getReader(); BlockBuilder bb = parser.parseBlock(toString(),in); in.close(); BuildContext bc = new BuildContext(_broker); newParameters = bc.getLocalVariables(); newFilters = bc.getFilters(); newContent = (Block) bb.build(bc); } catch (BuildException be) { newContent = null; _log.error("Template contained invalid data: " + be); throw be; } catch (IOException e) { newContent = null; // don't let the old one survive _log.error("Template: Could not read template: " + this); throw e; } finally { try { source.close(); } catch (Exception e) { } synchronized(this) { _parameters = newParameters; _filters = newFilters; _content = newContent; } } }
public final void parse() throws IOException, TemplateException { // thread policy: // // unsynchronized code elsewhere will access _content. We must // ensure that any data copied into _content is ready for public // use--which means dealing with two subtle issues. First, the Block // created by this method must be written back to main memory BEFORE // being referenced by _content. Second, once we add it to _content, // our copy of _content has to be copied back to main memory as well. // // Therefore we synchronize around the access to _content so as to // accomplish both these things. newContent will be written to main // memory at the start of the synchronized block, and _content will // be written to main memory at the close. Block newContent = null; Map newParameters = null; Reader source = null; Map newFilters = null; try { Parser parser = getParser(); source = getReader(); BlockBuilder bb = parser.parseBlock(toString(),in); in.close(); BuildContext bc = new BuildContext(_broker); newParameters = bc.getLocalVariables(); newFilters = bc.getFilters(); newContent = (Block) bb.build(bc); } catch (BuildException be) { newContent = null; _log.error("Template contained invalid data: " + be); throw be; } catch (IOException e) { newContent = null; // don't let the old one survive _log.error("Template: Could not read template: " + this); throw e; } finally { try { source.close(); } catch (Exception e) { } synchronized(this) { _parameters = newParameters; _filters = newFilters; _content = newContent; } } }
1,123,113
public void initializeContent(){ //TODO Remove this and use newer localization system: FacesContext context = FacesContext.getCurrentInstance(); WFPage.loadResourceBundles(context); super.initializeContent(); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabbedPane tb = new WFTabbedPane(); //tb.setMainAreaStyleClass(WFContainer.DEFAULT_STYLE_CLASS); tb.setId(TASKBAR_ID); add(tb); EditArticleView editArticleBlock = new EditArticleView(); tb.addTabVB(TASK_ID_EDIT, bref + "edit", editArticleBlock); tb.addTabVB(TASK_ID_DETAILS, bref + "details", new ArticleDetailView());// tb.addTabVB(TASK_ID_LIST, bref + "list", new ListArticlesBlock()); tb.addTabVB(TASK_ID_PREVIEW, bref + "preview", new ArticlePreview()); tb.setSelectedMenuItemId(TASK_ID_EDIT); //if (taskbarListener != null) { // tb.addTabListener(taskbarListener); //} String editMode = getEditMode(); if(editMode!=null){ editArticleBlock.setEditView(editMode); } }
public void initializeContent(){ //TODO Remove this and use newer localization system: FacesContext context = FacesContext.getCurrentInstance(); WFPage.loadResourceBundles(context); super.initializeContent(); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabbedPane tb = new WFTabbedPane(); //tb.setMainAreaStyleClass(WFContainer.DEFAULT_STYLE_CLASS); tb.setId(TASKBAR_ID); add(tb); EditArticleView editArticleBlock = new EditArticleView(); tb.addTabVB(TASK_ID_EDIT, bref + "edit", editArticleBlock); tb.addTabVB(TASK_ID_DETAILS, bref + "details", new ArticleDetailView());// tb.addTabVB(TASK_ID_LIST, bref + "list", new ListArticlesBlock()); tb.addTabVB(TASK_ID_PREVIEW, bref + "preview", new ArticlePreview()); tb.setSelectedMenuItemId(TASK_ID_EDIT); //if (taskbarListener != null) { // tb.addTabListener(taskbarListener); //} String editMode = getEditMode(); if(editMode!=null){ editArticleBlock.setEditMode(editMode); } }
1,123,114
public void serviceRegistered(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceRegistered(serviceEvent); } catch (Throwable e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceRegistered(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceRegistered(serviceEvent); } catch (Throwable e) { errors.addAll(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,115
public void serviceStarting(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStarting(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceStarting(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStarting(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,116
public void serviceWaitingToStart(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceWaitingToStart(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceWaitingToStart(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceWaitingToStart(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,117
public void serviceStartError(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStartError(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceStartError(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStartError(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,118
public void serviceRunning(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceRunning(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceRunning(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceRunning(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,119
public void serviceStopping(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStopping(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceStopping(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStopping(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,120
public void serviceWaitingToStop(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceWaitingToStop(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceWaitingToStop(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceWaitingToStop(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,121
public void serviceStopError(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStopError(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceStopError(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStopError(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,122
public void serviceStopped(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStopped(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceStopped(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceStopped(serviceEvent); } catch (Exception e) { errors.add(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,123
public void serviceUnregistered(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceUnregistered(serviceEvent); } catch (Exception e) { errors.addAll(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
public void serviceUnregistered(ServiceEvent serviceEvent) { List errors = new ArrayList(); Set serviceMonitors = getServiceMonitors(serviceEvent.getServiceName()); for (Iterator iterator = serviceMonitors.iterator(); iterator.hasNext();) { ServiceMonitor serviceMonitor = (ServiceMonitor) iterator.next(); try { serviceMonitor.serviceUnregistered(serviceEvent); } catch (Throwable e) { errors.addAll(fireServiceNotificationError(serviceMonitor, serviceEvent, e)); } } if (!errors.isEmpty()) { throw new KernelErrorsError(errors); } }
1,123,124
public void addServiceMonitor(ServiceMonitor serviceMonitor, ServiceName serviceName) { synchronized (serviceMonitors) { Set monitors = (Set) serviceMonitors.get(serviceName); if (monitors == null) { monitors = new LinkedHashSet(); serviceMonitors.put(serviceName, serviceMonitor); } monitors.add(serviceMonitor); } }
public void addServiceMonitor(ServiceMonitor serviceMonitor, ServiceName serviceName) { synchronized (serviceMonitors) { Set monitors = (Set) serviceMonitors.get(serviceName); if (monitors == null) { monitors = new LinkedHashSet(); serviceMonitors.put(serviceName, monitors); } monitors.add(serviceMonitor); } }
1,123,125
public void load(File file) throws XmlException, IOException{ ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(file); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); // System.out.println("loaded "+getBody()); }
public void load(String path) throws XmlException, IOException{ IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); HttpURL root = new HttpURL(service.getWebdavServerURL()+path); root.setUserinfo("root","root"); WebdavResource webdavResource = new WebdavResource(root); ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(file); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); // System.out.println("loaded "+getBody()); }
1,123,126
public void load(File file) throws XmlException, IOException{ ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(file); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); // System.out.println("loaded "+getBody()); }
public void load(File file) throws XmlException, IOException{ ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(webdavResource.getMethodDataAsString()); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); // System.out.println("loaded "+getBody()); }
1,123,127
public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) { if (getCase().getPublishedFromDate() == null) { addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY); storeOk = false; } } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment());// article.setImage(getImages());// article.setAttachment(getAttachments());// article.setRelatedItems(getRelatedContentItems()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; } try { articleDoc.save(new File("/Test/article/"+filename+".xml")); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } } return new Boolean(storeOk); }
public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) { if (getCase().getPublishedFromDate() == null) { addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY); storeOk = false; } } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment());// article.setImage(getImages());// article.setAttachment(getAttachments());// article.setRelatedItems(getRelatedContentItems()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; } try { articleDoc.save(new File("/Test/article/"+filename+".xml")); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } } return new Boolean(storeOk); }
1,123,129
public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) { if (getCase().getPublishedFromDate() == null) { addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY); storeOk = false; } } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment());// article.setImage(getImages());// article.setAttachment(getAttachments());// article.setRelatedItems(getRelatedContentItems()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; } try { articleDoc.save(new File("/Test/article/"+filename+".xml")); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } } return new Boolean(storeOk); }
public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) { if (getCase().getPublishedFromDate() == null) { addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY); storeOk = false; } } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment());// article.setImage(getImages());// article.setAttachment(getAttachments());// article.setRelatedItems(getRelatedContentItems()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; } try { articleDoc.save(new File("/Test/article/"+filename+".xml")); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } } return new Boolean(storeOk); }
1,123,130
public static final String createToolTip(String text) { final String htmlColor = toHTMLColor(TOOLTIP_COLOR); final String toolTip = "<html><table bgColor=" + htmlColor + "><tr><td>" + text + "</td></tr></table></table>"; return toolTip; }
public static final String createToolTip(String text, int width) { final String htmlColor = toHTMLColor(TOOLTIP_COLOR); final String toolTip = "<html><table bgColor=" + htmlColor + "><tr><td>" + text + "</td></tr></table></table>"; return toolTip; }
1,123,131
public static final String createToolTip(String text) { final String htmlColor = toHTMLColor(TOOLTIP_COLOR); final String toolTip = "<html><table bgColor=" + htmlColor + "><tr><td>" + text + "</td></tr></table></table>"; return toolTip; }
public static final String createToolTip(String text) { final String htmlColor = toHTMLColor(TOOLTIP_COLOR); final String toolTip = "<html><table width=" + width + " bgColor=" + htmlColor + "><tr><td>" + text + "</td></tr></table></table>"; return toolTip; }
1,123,132
synchronized public void shutdown() { _log.notice("shutting down"); Enumeration e = _providers.elements(); _providers.clear(); while (e.hasMoreElements()) { Provider pr = (Provider) e.nextElement(); _log.info("stopping: " + pr); pr.destroy(); } _ls.flush(); }
synchronized public void shutdown() { _log.notice("shutting down"); Enumeration e = _providers.elements(); while (e.hasMoreElements()) { Provider pr = (Provider) e.nextElement(); _log.info("stopping: " + pr); pr.destroy(); } _ls.flush(); }
1,123,133
public static LogSystem getInstance(String category) { synchronized (_instances) { if (category == null) return _singleton; LogSystem ls = (LogSystem) _instances.get(category); if (ls == null) { ls = new LogSystem(category); _instances.put(category, ls); } return ls; } }
public static LogSystem getInstance(String category) { synchronized (_instances) { if (category == null) return _singleton; LogSystem ls = (LogSystem) _instances.get(category); if (ls == null) { ls = new LogSystem(category); _instances.put(category, ls); } return ls; } }
1,123,135
synchronized public Log getLog(String type, String description) { LogSource l = (LogSource) _logs.get(type); if (l != null) return l; l = new LogSource(_category, type, description); _logs.put(type, l); Iterator i = _targets.iterator(); while (i.hasNext()) { LogTarget lt = (LogTarget) i.next(); for (int level = LogSystem.ALL; level < LogSystem.NONE; level++) { if (lt.subscribe(_category, type, level)) { l.addTarget(lt, level); } } } if (_log != null) { _log.info("Started log " + l.getType() + ": " + l.getDescription()); } return l; }
synchronized public Log getLog(String type, String description) { LogSource l = (LogSource) _logs.get(type); if (l != null) return l; l = new LogSource(_category, type, description); _logs.put(type, l); Iterator i = _targets.iterator(); while (i.hasNext()) { LogTarget lt = (LogTarget) i.next(); for (int level = LogSystem.ALL; level < LogSystem.NONE; level++) { if (lt.subscribe(_category, type, level)) { l.addTarget(lt, level); } } } if (_log != null) { _log.info("Started log " + l.getType() + ": " + l.getDescription()); } return l; }
1,123,136
public void load(URL u) throws IOException { InputStream in = u.openStream(); _props.load(in); in.close(); }
public void load(URL u) throws IOException { InputStream in = u.openStream(); _props.load(in); in.close(); }
1,123,137
public void handleEvent(Event e) { String methodDescriptor = srcToEvtToMethod.get(e.widget).get(e.type); controllers.invokeControllerMethod(methodDescriptor, e); }
public void handleEvent(Event e) { String methodDescriptor = srcToEvtToMethod.get(e.widget).get(e.type); dispatcher.invokeControllerMethod(methodDescriptor, e); }
1,123,138
final public Context getContext() { Pool cpool = (Pool) _contextCache.get(); Context c = (Context) cpool.get(); if (c == null) { c = (Context) _context.clone(); } c.setPool(cpool); return c; }
final public Context getContext() { Pool cpool = (Pool) _contextCache.get(); Context c = (Context) cpool.get(); if (c == null) { c = (Context) _context.clone(); c.setPool(cpool); } c.setPool(cpool); return c; }
1,123,140
final public Context getContext() { Pool cpool = (Pool) _contextCache.get(); Context c = (Context) cpool.get(); if (c == null) { c = (Context) _context.clone(); } c.setPool(cpool); return c; }
final public Context getContext() { Pool cpool = (Pool) _contextCache.get(); Context c = (Context) cpool.get(); if (c == null) { c = (Context) _context.clone(); } else c.clear(); return c; }
1,123,141
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); } Context ctx = c; ctx.setPool(cpool); return c; }
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); c.setPool(cpool); } Context ctx = c; ctx.setPool(cpool); return c; }
1,123,142
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); } Context ctx = c; ctx.setPool(cpool); return c; }
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); } Context ctx = c; ctx.setPool(cpool); return c; }
1,123,143
public TreeContextMenu(Control parent, Listener l) { // menu menu = new Menu(parent); l.mapEvent(menu, SWT.Show, TreeContextMenuController.INITIALISE_MENU); parent.setMenu(menu); // menu items addNote = createMenuItem(menu, "Add Note", l, TreeContextMenuController.ADD_NOTE); removeNotes = createMenuItem(menu, "Remove Notes", l, TreeContextMenuController.REMOVE_NOTES); renameNote = createMenuItem(menu, "Rename Note", l, TreeContextMenuController.RENAME_NOTE); }
public TreeContextMenu(Control parent, Listener l) { // menu menu = new Menu(parent); l.mapEvent(menu, SWT.Show, TreeController.INITIALISE_CONTEXT_MENU); l.mapEvent(menu, SWT.Dispose, TreeController.DISPOSE_CONTEXT_MENU); parent.setMenu(menu); // menu items addNote = createMenuItem(menu, "Add Note", l, TreeContextMenuController.ADD_NOTE); removeNotes = createMenuItem(menu, "Remove Notes", l, TreeContextMenuController.REMOVE_NOTES); renameNote = createMenuItem(menu, "Rename Note", l, TreeContextMenuController.RENAME_NOTE); }
1,123,144
public PreferencesPanel(Iterator preferences) { this.setLayout(new GridBagLayout()); titleLabel.setText(Res.getString("title.preferences")); titleLabel.setFont(new Font("Dialog", Font.BOLD, 15)); JScrollPane scrollPane = new JScrollPane(list); scrollPane.setPreferredSize(new Dimension(125, 0)); list.setFixedCellHeight(70); add(scrollPane, new GridBagConstraints(0, 0, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(5, 5, 5, 5), 0, 0)); add(flowPanel, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); list.setCellRenderer(new JLabelIconRenderer()); list.addListSelectionListener(this); // Populate with current preferences while (preferences.hasNext()) { Preference preference = (Preference)preferences.next(); listModel.addElement(new PreferenceUI(preference)); } list.setSelectedIndex(0); }
public PreferencesPanel(Iterator preferences) { this.setLayout(new GridBagLayout()); titleLabel.setText(Res.getString("title.preferences")); titleLabel.setFont(new Font("Dialog", Font.BOLD, 15)); JScrollPane scrollPane = new JScrollPane(list); scrollPane.setPreferredSize(new Dimension(125, 0)); list.setFixedCellHeight(70); add(scrollPane, new GridBagConstraints(0, 0, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(5, 5, 5, 5), 30, 0)); add(flowPanel, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); list.setCellRenderer(new JLabelIconRenderer()); list.addListSelectionListener(this); // Populate with current preferences while (preferences.hasNext()) { Preference preference = (Preference)preferences.next(); listModel.addElement(new PreferenceUI(preference)); } list.setSelectedIndex(0); }
1,123,145
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[71] = jj_gen; break label_11; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case END: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[72] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[74] = jj_gen; ; } label_12: while (true) { if (jj_2_21(1)) { ; } else { break label_12; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[75] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[76] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[77] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[71] = jj_gen; break label_11; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; t = jj_consume_token(END); break; default: jj_la1[72] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[74] = jj_gen; ; } label_12: while (true) { if (jj_2_21(1)) { ; } else { break label_12; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[75] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[76] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[77] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
1,123,146
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[71] = jj_gen; break label_11; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case END: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[72] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[74] = jj_gen; ; } label_12: while (true) { if (jj_2_21(1)) { ; } else { break label_12; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[75] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[76] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[77] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[71] = jj_gen; break label_11; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case END: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[72] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[74] = jj_gen; ; } label_12: while (true) { if (jj_2_21(1)) { ; } else { break label_12; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; t = jj_consume_token(RBRACE); break; default: jj_la1[75] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[76] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[77] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
1,123,147
final public BlockBuilder LiteralBlock() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; if (jj_2_20(2147483647)) { jj_consume_token(LBRACE); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[63] = jj_gen; break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case BEGIN: case END: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[64] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[65] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); break; default: jj_la1[66] = jj_gen; ; } label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[67] = jj_gen; break label_10; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[68] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[69] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(END); break; default: jj_la1[70] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return block;} throw new Error("Missing return statement in function"); }
final public BlockBuilder LiteralBlock() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; if (jj_2_20(2147483647)) { jj_consume_token(LBRACE); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[63] = jj_gen; break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; t = jj_consume_token(END); break; default: jj_la1[64] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[65] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); break; default: jj_la1[66] = jj_gen; ; } label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[67] = jj_gen; break label_10; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[68] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[69] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(END); break; default: jj_la1[70] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return block;} throw new Error("Missing return statement in function"); }
1,123,148
final public BlockBuilder LiteralBlock() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; if (jj_2_20(2147483647)) { jj_consume_token(LBRACE); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[63] = jj_gen; break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case BEGIN: case END: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[64] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[65] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); break; default: jj_la1[66] = jj_gen; ; } label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[67] = jj_gen; break label_10; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[68] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[69] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(END); break; default: jj_la1[70] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return block;} throw new Error("Missing return statement in function"); }
final public BlockBuilder LiteralBlock() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; if (jj_2_20(2147483647)) { jj_consume_token(LBRACE); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[63] = jj_gen; break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case BEGIN: case END: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[64] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[65] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case LBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); break; default: jj_la1[66] = jj_gen; ; } label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case LBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[67] = jj_gen; break label_10; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: LiteralWMContent(block); break; case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; t = jj_consume_token(RBRACE); break; default: jj_la1[68] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[69] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(END); break; default: jj_la1[70] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return block;} throw new Error("Missing return statement in function"); }
1,123,149
final public BlockBuilder WMDocument() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[78] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case END: case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[79] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(0); {if (true) return block;} throw new Error("Missing return statement in function"); }
final public BlockBuilder WMDocument() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[78] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; t = jj_consume_token(END); break; case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[79] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(0); {if (true) return block;} throw new Error("Missing return statement in function"); }
1,123,150
final public BlockBuilder WMDocument() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case LBRACE: case RBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[78] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case END: case LBRACE: case RBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[79] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(0); {if (true) return block;} throw new Error("Missing return statement in function"); }
final public BlockBuilder WMDocument() throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(); Token t; label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case BEGIN: case END: case LBRACE: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[78] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case BEGIN: case END: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; case LBRACE: t = jj_consume_token(LBRACE); break; t = jj_consume_token(RBRACE); break; default: jj_la1[79] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(0); {if (true) return block;} throw new Error("Missing return statement in function"); }
1,123,151
final private boolean jj_3R_15() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_15() { if (jj_scan_token(BEGIN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,152
final private boolean jj_3R_16() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_16() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,153
final private boolean jj_3R_18() { if (jj_scan_token(OP_MULT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_18() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,154
final private boolean jj_3R_19() { if (jj_scan_token(OP_DIV)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_19() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,155
final private boolean jj_3R_20() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_20() { if (jj_scan_token(OP_MULT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,156
final private boolean jj_3R_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_42()) { jj_scanpos = xsp; if (jj_3R_43()) { jj_scanpos = xsp; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_42()) { jj_scanpos = xsp; if (jj_3R_43()) { jj_scanpos = xsp; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,157
final private boolean jj_3R_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_42()) { jj_scanpos = xsp; if (jj_3R_43()) { jj_scanpos = xsp; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_42()) { jj_scanpos = xsp; if (jj_3R_43()) { jj_scanpos = xsp; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,158
final private boolean jj_3R_23() { if (jj_scan_token(OP_PLUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,159
final private boolean jj_3R_24() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_24() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,161
final private boolean jj_3R_25() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_25() { if (jj_scan_token(OP_PLUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,162
final private boolean jj_3R_26() { if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_26() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,163
final private boolean jj_3R_28() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_28() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,164
final private boolean jj_3R_28() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_28() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,165
final private boolean jj_3R_30() { if (jj_3R_26()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,166
final private boolean jj_3R_32() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_32() { if (jj_3R_28()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
1,123,168