bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
private void bootstrapLog4J() { /* HACK if the logging root is set; we know we are being run within the * thinkParity server and need not reset the configuration. */ final String loggingRootProperty = System.getProperty("thinkparity.logging.root"); final boolean isDesktop = null == loggingRootProperty; final Properties logging = bootstrapLog4JConfig(mode); final File loggingRoot = bootstrapLog4JRoot(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d{ISO8601} %x %t %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d{ISO8601} %x %t %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}{2}", loggingRoot, File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d{ISO8601} %x %t %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}{2}", loggingRoot, File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d{ISO8601} %x %t %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}{2}", loggingRoot, File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.com.thinkparity.ophelia", "WARN, DEFAULT"); logging.setProperty("log4j.additivity.com.thinkparity.ophelia", "false"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.com.thinkparity.ophelia", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.additivity.com.thinkparity.ophelia", "false"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.com.thinkparity.ophelia", "INFO, DEFAULT"); logging.setProperty("log4j.additivity.com.thinkparity.ophelia", "false"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty( "log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.util.xmpp.event.XMPPEvent", "com.thinkparity.codebase.model.util.logging.or.XMPPEventRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.container.Container", "com.thinkparity.codebase.model.util.logging.or.ContainerRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty( "log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); if (isDesktop) LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper("DEFAULT").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
private void bootstrapLog4J() { /* HACK if the logging root is set; we know we are being run within the * thinkParity server and need not reset the configuration. */ final String loggingRootProperty = System.getProperty("thinkparity.logging.root"); final boolean isDesktop = null == loggingRootProperty; final Properties logging = bootstrapLog4JConfig(mode); final File loggingRoot = bootstrapLog4JRoot(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d{ISO8601} %x %t %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d{ISO8601} %x %t %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}{2}", loggingRoot, File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d{ISO8601} %x %t %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}{2}", loggingRoot, File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d{ISO8601} %x %t %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}{2}", loggingRoot, File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.com.thinkparity.ophelia", "WARN, DEFAULT"); logging.setProperty("log4j.additivity.com.thinkparity.ophelia", "false"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.com.thinkparity.ophelia", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.additivity.com.thinkparity.ophelia", "false"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.com.thinkparity.ophelia", "INFO, DEFAULT"); logging.setProperty("log4j.additivity.com.thinkparity.ophelia", "false"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty( "log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.util.xmpp.event.XMPPEvent", "com.thinkparity.codebase.model.util.logging.or.XMPPEventRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.container.Container", "com.thinkparity.codebase.model.util.logging.or.ContainerRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty( "log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty( "log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); if (desktop) LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper("DEFAULT").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
1,114,443
private Properties load(final File file) { try { init(file); } catch(final IOException iox) { throw new RuntimeException(iox); } final Properties properties = new Properties(); try { properties.load(new FileInputStream(file)); } catch(final IOException iox) { throw new RuntimeException(iox); } return properties; }
private Properties load(final File file) { try { init(file); } catch(final IOException iox) { throw new RuntimeException(iox); } final Properties properties = new Properties(); try { properties.load(new FileInputStream(file)); } catch(final IOException iox) { throw new RuntimeException(iox); } return properties; }
1,114,444
private void store(final Properties properties, final File file) { try { properties.store(new FileOutputStream(file), ""); } catch(final IOException iox) { throw new RuntimeException(iox); } }
private void store(final Properties properties, final File file) { try { properties.store(new FileOutputStream(file), ""); } catch(final IOException iox) { throw new RuntimeException(iox); } }
1,114,445
public void invoke(final Data data) throws Exception { final String criteria = (String) data.get(DataKey.CRITERIA); if(null == criteria || 1 > criteria.length()) { browser.removeSearchFilter(); } else { final List<IndexHit> searchResult = getIndexModel().search(criteria); browser.applySearchFilter(searchResult); } }
public void invoke(final Data data) throws Exception { final String criteria = (String) data.get(DataKey.CRITERIA); if(null == criteria || 1 > criteria.length()) { browser.removeSearchFilter(); } else { final List<IndexHit> searchResult = getIndexModel().searchArtifact(criteria); browser.applySearchFilter(searchResult); } }
1,114,446
public List<DocumentVersion> readVersions(final UUID uniqueId) { // bit of a wierd workflow to ensure the container is archived final Long containerId = readArchivedArtifactId(containerUniqueId); if (null == containerId) { return Collections.emptyList(); } else { final Long documentId = readArtifactId(uniqueId); return documentModel.readVersions(documentId); } }
public List<DocumentVersion> readVersions(final UUID uniqueId) { // bit of a wierd workflow to ensure the container is archived final Long containerId = readArchivedArtifactId(containerUniqueId); if (null == containerId) { return Collections.emptyList(); } else { final Long documentId = readArtifactId(uniqueId); return documentModel.readVersions(documentId); } }
1,114,447
public FullScreen(String moduleName) { super(moduleName); JFrame main = new JFrame(); main.setSize(500, 500); /* * main = new JWindow(); * GraphicsEnvironment.getLocalGraphicsEnvironment() * .getDefaultScreenDevice().setFullScreenWindow(main); */ Container mainpane = main.getContentPane(); mainpane.setBackground(Color.black); JPanel list = new JPanel(); list.setLayout(new BoxLayout(list, BoxLayout.PAGE_AXIS)); list.setBackground(Color.black); JButton b = new JButton(); b.setText("Quit"); b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); }; }); earthView = new EarthView(); earthView.setVisible(true); earthView.setStoryQueue(storyQueue); list.add(earthView); list.add(b); mainpane.add(list); main.setVisible(true); }
public FullScreen(String moduleName) { super(moduleName); JFrame main = new JFrame(); main.setSize(500, 500); /* * main = new JWindow(); * GraphicsEnvironment.getLocalGraphicsEnvironment() * .getDefaultScreenDevice().setFullScreenWindow(main); */ Container mainpane = main.getContentPane(); mainpane.setBackground(Color.black); JPanel list = new JPanel(); list.setLayout(new BoxLayout(list, BoxLayout.PAGE_AXIS)); list.setBackground(Color.black); JButton b = new JButton(); b.setText("Quit"); b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); }; }); earthView = new EarthView(); earthView.setVisible(true); earthView.setStoryQueue(storyQueue); list.add(earthView); list.add(b); mainpane.add(list); main.setVisible(true); }
1,114,448
public ShowOffObject(String moduleName) { super(moduleName); storyQueue = new LinkedList<Story>(); }
public ShowOffObject(String moduleName) { super(moduleName); storyQueue = new LinkedList<Story>(); }
1,114,449
public MainProvider(final ArtifactModel artifactModel, final DocumentModel documentModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = assertNotNullLong( "The main provider's document provider requires " + "non-null java.lang.Long input.", input); try { final Document document = documentModel.get(documentId); return toDisplay(document, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> hasBeenSeen ? true b4 false // +> last update ? earlier b4 later // +> name ? alpha order final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); final Collection<Document> documents = documentModel.list(sort); return toDisplay(documents, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider}; }
public MainProvider(final ArtifactModel artifactModel, final DocumentModel documentModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = assertNotNullLong( "The main provider's document provider requires " + "non-null java.lang.Long input.", input); try { final Document document = documentModel.get(documentId); return toDisplay(document, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> hasBeenSeen ? true b4 false // +> last update ? earlier b4 later // +> name ? alpha order final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); final Collection<Document> documents = documentModel.list(sort); return toDisplay(documents, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
1,114,450
public List<DocumentVersion> readVersions(final UUID uniqueId) { // bit of a wierd workflow to ensure the container is backed up final Long containerId = readBackupArtifactId(containerUniqueId); if (null == containerId) { return Collections.emptyList(); } else { final Long documentId = readArtifactId(uniqueId); return documentModel.readVersions(documentId); } }
public List<DocumentVersion> readVersions(final UUID uniqueId) { // bit of a wierd workflow to ensure the container is backed up final Long containerId = readBackupArtifactId(containerUniqueId); if (null == containerId) { return Collections.emptyList(); } else { final Long documentId = readArtifactId(uniqueId); return documentModel.readVersions(documentId); } }
1,114,451
public void run() { getTabContainerAvatar().syncContainer(containerId, remote, select); }
public void run() { getTabContainerAvatar().syncContainer(containerId, Boolean.FALSE, select); }
1,114,452
public void run() { getTabContainerAvatar().syncContainer(containerId, Boolean.FALSE, select); }
public void run() { getTabContainerAvatar().syncContainer(containerId, remote, select); }
1,114,453
public void run() { getTabContainerAvatar().syncContainer(containerId, remote, select); }
public void run() { getTabContainerAvatar().syncDocument(containerId, documentId, Boolean.FALSE); }
1,114,454
public void run() { getTabContainerAvatar().syncDocument(containerId, documentId, Boolean.FALSE); }
public void run() { getTabContainerAvatar().syncDocument(documentId, Boolean.FALSE); }
1,114,455
public void run() { getTabContainerAvatar().syncDocument(documentId, Boolean.FALSE); }
public void run() { getTabContainerAvatar().syncDocument(documentId, Boolean.FALSE); }
1,114,456
protected void delete(final Term term) throws IOException { final IndexReader indexReader = openIndexReader(); try { Assert.assertTrue("COULD NOT DELETE FROM INDEX", 1 == indexReader.deleteDocuments(term)); } finally { closeIndexReader(indexReader); } }
protected void delete(final Term term) throws IOException { final IndexReader indexReader = openIndexReader(); try { Assert.assertTrue("COULD NOT DELETE FROM INDEX", 1 == indexReader.deleteDocuments(term)); } finally { closeIndexReader(indexReader); } }
1,114,457
public static ArtifactFlag fromId(final Integer id) { switch(id) { case 0: return SEEN; default: throw Assert.createUnreachable("Unknown artifact flag id: " + id); } }
public static ArtifactFlag fromId(final Integer id) { switch(id) { case 0: return KEY; case 1: return SEEN; default: throw Assert.createUnreachable("Unknown artifact flag id: " + id); } }
1,114,458
public Object getElement(final Object input) { Assert.assertNotNull( "The history provider requries java.lang.Long input.", input); Assert.assertOfType( "The history provider requries java.lang.Long input.", Long.class, input); try { return documentModel.get((Long) input); } catch(final ParityException px) { throw new RuntimeException(px); } }
public Object getElement(final Object input) { Assert.assertNotNull( "The history provider requries java.lang.Long input.", input); Assert.assertOfType( "The history provider requries java.lang.Long input.", Long.class, input); try { return dModel.get((Long) input); } catch(final ParityException px) { throw new RuntimeException(px); } }
1,114,459
public Object[] getElements(final Object input) { Assert.assertNotNull( "The history provider requries java.lang.Long input.", input); Assert.assertOfType( "The history provider requries java.lang.Long input.", Long.class, input); try { return documentModel.readHistory((Long) input).toArray(new HistoryItem[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } }
public Object[] getElements(final Object input) { Assert.assertNotNull( "The history provider requries java.lang.Long input.", input); Assert.assertOfType( "The history provider requries java.lang.Long input.", Long.class, input); try { return dModel.readHistory((Long) input).toArray(new HistoryItem[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } }
1,114,460
DocumentListItem(final DisplayDocument displayDocument) { super("DocumentListItem"); this.displayDocument = displayDocument; setDocumentId(displayDocument.getDocumentId()); if(displayDocument.isUrgent()) { setBackgroundImage(BG_URGENT); setBackgroundImageSelected(BG_URGENT_SEL); setNameForeground(NAME_FOREGROUND_URGENT); setNameInfo(displayDocument.getUrgentInfo(this)); if(displayDocument.hasBeenSeen()) { setNameFont(BrowserConstants.DefaultFont); } else { setNameFont(BrowserConstants.DefaultFontBold); } } else { if(displayDocument.isClosed()) { setBackgroundImage(BG_CLOSED); setBackgroundImageSelected(BG_CLOSED_SEL); setNameForeground(NAME_FOREGROUND_CLOSED); if(displayDocument.hasBeenSeen()) { setNameFont(BrowserConstants.DefaultFont); } else { setNameFont(BrowserConstants.DefaultFontBold); } } else { setBackgroundImage(BG); setBackgroundImageSelected(BG_SEL); setNameForeground(NAME_FOREGROUND); if(displayDocument.hasBeenSeen()) { setNameFont(BrowserConstants.DefaultFont); } else { setNameFont(BrowserConstants.DefaultFontBold); } } } setName(displayDocument.getDisplay()); if(displayDocument.isKeyHolder()) { setInfoIcon(KEY_ICON); } }
DocumentListItem(final DisplayDocument displayDocument) { super("DocumentListItem"); this.displayDocument = displayDocument; setDocumentId(displayDocument.getDocumentId()); if(displayDocument.isUrgent()) { setBackgroundImage(BG_URGENT); setBackgroundImageSelected(BG_URGENT_SEL); setNameForeground(NAME_FOREGROUND_URGENT); if(displayDocument.hasBeenSeen()) { setNameFont(BrowserConstants.DefaultFont); } else { setNameFont(BrowserConstants.DefaultFontBold); } } else { if(displayDocument.isClosed()) { setBackgroundImage(BG_CLOSED); setBackgroundImageSelected(BG_CLOSED_SEL); setNameForeground(NAME_FOREGROUND_CLOSED); if(displayDocument.hasBeenSeen()) { setNameFont(BrowserConstants.DefaultFont); } else { setNameFont(BrowserConstants.DefaultFontBold); } } else { setBackgroundImage(BG); setBackgroundImageSelected(BG_SEL); setNameForeground(NAME_FOREGROUND); if(displayDocument.hasBeenSeen()) { setNameFont(BrowserConstants.DefaultFont); } else { setNameFont(BrowserConstants.DefaultFontBold); } } } setName(displayDocument.getDisplay()); if(displayDocument.isKeyHolder()) { setInfoIcon(KEY_ICON); } }
1,114,461
public Object getObject(Session session, Class clazz, String path) { try { if (!session.itemExists(path)) { return null; } ClassDescriptor classDescriptor = getClassDescriptor(clazz);// if (classDescriptor.isAbstract()) {// throw new PersistenceException("Cannot fetch declared abstract object of type "// + clazz.getName());// } checkNodeType(session, classDescriptor); Node node = (Node) session.getItem(path); checkCompatibleNodeTypes(session, node, classDescriptor, true); Object object = null; if (classDescriptor.usesNodeTypePerHierarchyStrategy()) { String discriminatorProperty = classDescriptor.getDiscriminatorFieldDescriptor().getJcrName(); if (!node.hasProperty(discriminatorProperty)) { throw new PersistenceException("Cannot fetch object of type '" + clazz.getName() + "' using NODETYPE_PER_HIERARCHY. Discriminator property is not present."); } String className = node.getProperty(discriminatorProperty).getValue().getString(); object = ReflectionUtils.newInstance(className); } else { object = ReflectionUtils.newInstance(clazz); } retrieveSimpleFields(session, classDescriptor, node, object); retrieveBeanFields(session, classDescriptor, node, path, object); retrieveCollectionFields(session, classDescriptor, node, object); return object; } catch(PathNotFoundException pnfe) { // HINT should never get here throw new PersistenceException("Impossible to get the object at " + path, pnfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Impossible to get the object at " + path, re); } }
public Object getObject(Session session, Class clazz, String path) { try { if (!session.itemExists(path)) { return null; } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } ClassDescriptor classDescriptor = getClassDescriptor(clazz);// if (classDescriptor.isAbstract()) {// throw new PersistenceException("Cannot fetch declared abstract object of type "// + clazz.getName());// } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } checkNodeType(session, classDescriptor); Node node = (Node) session.getItem(path); checkCompatibleNodeTypes(session, node, classDescriptor, true); Object object = null; if (classDescriptor.usesNodeTypePerHierarchyStrategy()) { String discriminatorProperty = classDescriptor.getDiscriminatorFieldDescriptor().getJcrName(); if (!node.hasProperty(discriminatorProperty)) { throw new PersistenceException("Cannot fetch object of type '" + clazz.getName() + "' using NODETYPE_PER_HIERARCHY. Discriminator property is not present."); } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } String className = node.getProperty(discriminatorProperty).getValue().getString(); object = ReflectionUtils.newInstance(className); } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } else { object = ReflectionUtils.newInstance(clazz); } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } retrieveSimpleFields(session, classDescriptor, node, object); retrieveBeanFields(session, classDescriptor, node, path, object); retrieveCollectionFields(session, classDescriptor, node, object); return object; } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } catch(PathNotFoundException pnfe) { // HINT should never get here throw new PersistenceException("Impossible to get the object at " + path, pnfe); } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Impossible to get the object at " + path, re); } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); } } catch(ClassNotFoundException clnf) { throw new PersistenceException("Impossible to instantiate the object at " + path, clnf); }
1,114,463
private void retrieveBeanFields(Session session, ClassDescriptor classDescriptor, Node node, String path, Object object) { Iterator beanDescriptorIterator = classDescriptor.getBeanDescriptors().iterator(); while (beanDescriptorIterator.hasNext()) { BeanDescriptor beanDescriptor = (BeanDescriptor) beanDescriptorIterator.next(); String beanName = beanDescriptor.getFieldName(); Class beanClass = ReflectionUtils.getPropertyType(object, beanName); Object bean = null; if (beanDescriptor.isInline()) { bean = ReflectionUtils.newInstance(beanClass); bean = this.retrieveSimpleFields(session, getClassDescriptor(beanClass), node, bean); } else if (null != beanDescriptor.getBeanConverter()) { bean = beanDescriptor.getBeanConverter().getObject(session, node, beanDescriptor, beanClass); } else { bean = this.getObject(session, beanClass, path + "/" + beanDescriptor.getJcrName()); } ReflectionUtils.setNestedProperty(object, beanName, bean); } }
private void retrieveBeanFields(Session session, ClassDescriptor classDescriptor, Node node, String path, Object object) { Iterator beanDescriptorIterator = classDescriptor.getBeanDescriptors().iterator(); while (beanDescriptorIterator.hasNext()) { BeanDescriptor beanDescriptor = (BeanDescriptor) beanDescriptorIterator.next(); String beanName = beanDescriptor.getFieldName(); Class beanClass = ReflectionUtils.getPropertyType(object, beanName); Object bean = null; if (beanDescriptor.isInline()) { bean = ReflectionUtils.newInstance(beanClass); bean = this.retrieveSimpleFields(session, getClassDescriptor(beanClass), node, bean); } else if (null != beanDescriptor.getBeanConverter()) { bean = beanDescriptor.getBeanConverter().getObject(session, node, beanDescriptor, beanClass); } else { bean = this.getObject(session, beanClass, path + "/" + beanDescriptor.getJcrName()); } ReflectionUtils.setNestedProperty(object, beanName, bean); } }
1,114,464
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
1,114,467
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(initializedBean, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
1,114,468
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(initializedBean, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, initializedBean, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(initializedBean, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
1,114,470
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(initializedBean, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
1,114,471
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return object; }
private Object retrieveSimpleFields(Session session, ClassDescriptor classDescriptor, Node node, Object object) { // Object initializedBean = object; try { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) {// if (null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } // ReflectionUtils.setNestedProperty(initializedBean, fieldName, node.getPath()); ReflectionUtils.setNestedProperty(object, fieldName, node.getPath()); } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && fieldDescriptor.isDiscriminator()) { if (node.hasProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName())) {// if (null == initializedBean) {// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } String value = node.getProperty( classDescriptor.getDiscriminatorFieldDescriptor().getJcrName()).getValue().getString(); ReflectionUtils.setNestedProperty(object, fieldName, value); } else { throw new PersistenceException("Class '" + classDescriptor.getClassName() + "' have not a discriminator property."); } } else { if (node.hasProperty(propertyName)) { Value propValue = node.getProperty(propertyName).getValue();// if (null != propValue && null == initializedBean) { // HINT: lazy initialize target bean// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());// } AtomicTypeConverter converter= getAtomicTypeConverter(fieldDescriptor, object, fieldName); Object fieldValue = converter.getObject(propValue); ReflectionUtils.setNestedProperty(object, fieldName, fieldValue); } else { log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName); } } } } catch(ValueFormatException vfe) { throw new PersistenceException( "Cannot retrieve properties of object " + object + " from node " + node, vfe); } catch(RepositoryException re) { throw new org.apache.portals.graffito.jcr.exception.RepositoryException( "Cannot retrieve properties of object " + object + " from node " + node, re); } return initializedBean; }
1,114,472
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactDeletedIQ query = new HandleContactDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactDeletedIQ query = new HandleContactDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
1,114,473
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactDeletedIQ query = new HandleContactDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactDeletedIQ query = new HandleContactDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else { isComplete = true; } } return query; }
1,114,474
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactUpdatedIQ query = new HandleContactUpdatedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("contactId")) { query.contactId = readJabberId2(); } else if (isStartTag("updatedOn")) { query.updatedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactUpdatedIQ query = new HandleContactUpdatedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("contactId")) { query.contactId = readJabberId2(); } else if (isStartTag("updatedOn")) { query.updatedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
1,114,475
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactUpdatedIQ query = new HandleContactUpdatedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("contactId")) { query.contactId = readJabberId2(); } else if (isStartTag("updatedOn")) { query.updatedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleContactUpdatedIQ query = new HandleContactUpdatedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("contactId")) { query.contactId = readJabberId2(); } else if (isStartTag("updatedOn")) { query.updatedOn = readCalendar2(); } else { isComplete = true; } } return query; }
1,114,476
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationExtendedIQ query = new HandleInvitationExtendedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("extendedTo")) { query.invitedAs = readEMail2(); } else if (isStartTag("extendedBy")) { query.invitedBy = readJabberId2(); } else if (isStartTag("extendedOn")) { query.invitedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationExtendedIQ query = new HandleInvitationExtendedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("extendedTo")) { query.invitedAs = readEMail2(); } else if (isStartTag("extendedBy")) { query.invitedBy = readJabberId2(); } else if (isStartTag("extendedOn")) { query.invitedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
1,114,477
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationExtendedIQ query = new HandleInvitationExtendedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("extendedTo")) { query.invitedAs = readEMail2(); } else if (isStartTag("extendedBy")) { query.invitedBy = readJabberId2(); } else if (isStartTag("extendedOn")) { query.invitedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationExtendedIQ query = new HandleInvitationExtendedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("extendedTo")) { query.invitedAs = readEMail2(); } else if (isStartTag("extendedBy")) { query.invitedBy = readJabberId2(); } else if (isStartTag("extendedOn")) { query.invitedOn = readCalendar2(); } else { isComplete = true; } } return query; }
1,114,478
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationAcceptedIQ query = new HandleInvitationAcceptedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("acceptedBy")) { query.acceptedBy = readJabberId2(); } else if (isStartTag("acceptedOn")) { query.acceptedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationAcceptedIQ query = new HandleInvitationAcceptedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("acceptedBy")) { query.acceptedBy = readJabberId2(); } else if (isStartTag("acceptedOn")) { query.acceptedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
1,114,479
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationAcceptedIQ query = new HandleInvitationAcceptedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("acceptedBy")) { query.acceptedBy = readJabberId2(); } else if (isStartTag("acceptedOn")) { query.acceptedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationAcceptedIQ query = new HandleInvitationAcceptedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("acceptedBy")) { query.acceptedBy = readJabberId2(); } else if (isStartTag("acceptedOn")) { query.acceptedOn = readCalendar2(); } else { isComplete = true; } } return query; }
1,114,480
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationDeletedIQ query = new HandleInvitationDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (!isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else if (isStartTag("invitedAs")) { query.invitedAs = readEMail2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationDeletedIQ query = new HandleInvitationDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (!isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else if (isStartTag("invitedAs")) { query.invitedAs = readEMail2(); } else { isComplete = Boolean.TRUE; } } return query; }
1,114,481
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationDeletedIQ query = new HandleInvitationDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (!isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else if (isStartTag("invitedAs")) { query.invitedAs = readEMail2(); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleInvitationDeletedIQ query = new HandleInvitationDeletedIQ(); Boolean isComplete = Boolean.FALSE; while (!isComplete) { if (isStartTag("deletedBy")) { query.deletedBy = readJabberId2(); } else if (isStartTag("deletedOn")) { query.deletedOn = readCalendar2(); } else if (isStartTag("invitedAs")) { query.invitedAs = readEMail2(); } else { isComplete = true; } } return query; }
1,114,482
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser(parser); final HandleInvitationDeclinedIQ query = new HandleInvitationDeclinedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { next(1); if (isStartTag(Xml.Contact.INVITED_AS)) { next(1); query.invitedAs = readEMail(); next(1); } else if (isEndTag(Xml.Contact.INVITED_AS)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_BY)) { next(1); query.declinedBy = readJabberId(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_BY)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_ON)) { next(1); query.declinedOn = readCalendar(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_ON)) { next(1); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser(parser); final HandleInvitationDeclinedIQ query = new HandleInvitationDeclinedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { next(1); if (isStartTag(Xml.Contact.INVITED_AS)) { next(1); query.invitedAs = readEMail(); next(1); } else if (isEndTag(Xml.Contact.INVITED_AS)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_BY)) { next(1); query.declinedBy = readJabberId(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_BY)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_ON)) { next(1); query.declinedOn = readCalendar(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_ON)) { next(1); } else { isComplete = Boolean.TRUE; } } return query; }
1,114,483
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser(parser); final HandleInvitationDeclinedIQ query = new HandleInvitationDeclinedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { next(1); if (isStartTag(Xml.Contact.INVITED_AS)) { next(1); query.invitedAs = readEMail(); next(1); } else if (isEndTag(Xml.Contact.INVITED_AS)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_BY)) { next(1); query.declinedBy = readJabberId(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_BY)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_ON)) { next(1); query.declinedOn = readCalendar(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_ON)) { next(1); } else { isComplete = Boolean.TRUE; } } return query; }
public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser(parser); final HandleInvitationDeclinedIQ query = new HandleInvitationDeclinedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { next(1); if (isStartTag(Xml.Contact.INVITED_AS)) { next(1); query.invitedAs = readEMail(); next(1); } else if (isEndTag(Xml.Contact.INVITED_AS)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_BY)) { next(1); query.declinedBy = readJabberId(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_BY)) { next(1); } else if (isStartTag(Xml.Contact.DECLINED_ON)) { next(1); query.declinedOn = readCalendar(); next(1); } else if (isEndTag(Xml.Contact.DECLINED_ON)) { next(1); } else { isComplete = true; } } return query; }
1,114,484
void delete(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { final Container container = read(containerId); if (isDistributed(container.getId())) { final TeamMember localTeamMember = localTeamMember(container.getId()); final List<JabberId> team = getArtifactModel().readTeamIds(container.getId()); team.remove(localUserId()); getSessionModel().removeTeamMember( container.getUniqueId(), team, localTeamMember.getId()); deleteLocal(container.getId()); } else { deleteLocal(container.getId()); } // fire event notifyContainerDeleted(container, localEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
void delete(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { final Container container = read(containerId); if (isDistributed(container.getId())) { final TeamMember localTeamMember = localTeamMember(container.getId()); final List<JabberId> team = getArtifactModel().readTeamIds(container.getId()); team.remove(localUserId()); getSessionModel().removeTeamMember( container.getUniqueId(), team, localTeamMember.getId()); deleteLocal(container.getId()); } else { deleteLocal(container.getId()); } // fire event notifyContainerDeleted(container, localEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
1,114,486
void restoreBackup() { logger.logApiId(); try { final List<Container> containers = read(); if (0 < containers.size()) { logger.logWarning("{0} containers will be deleted.", containers.size()); for (final Container container : containers) { delete(container.getId()); } } final InternalBackupModel backupModel = getBackupModel(); final List<Container> backupContainers = backupModel.readContainers(); logger.logVariable("backupContainers.size()", backupContainers.size()); for (final Container backupContainer : backupContainers) { restore(backupContainer, new RestoreModel() { public InputStream openDocumentVersion(final UUID uniqueId, final Long versionId) { return backupModel.openDocumentVersion(uniqueId, versionId); } public List<ContainerVersion> readContainerVersions( final UUID uniqueId) { return backupModel.readContainerVersions(uniqueId); } public List<Document> readDocuments(final UUID uniqueId, final Long versionId) { return backupModel.readDocuments(uniqueId, versionId); } public List<DocumentVersion> readDocumentVersions( final UUID uniqueId, final Long versionId) { return backupModel.readDocumentVersions(uniqueId, versionId); } public Map<User, ArtifactReceipt> readPublishedTo( final UUID uniqueId, final Long versionId) { return backupModel.readPublishedTo(uniqueId, versionId); } public List<JabberId> readTeamIds(final UUID uniqueId) { return backupModel.readTeamIds(uniqueId); } }); } } catch (final Throwable t) { throw translateError(t); } }
void restoreBackup() { logger.logApiId(); try { final List<Container> containers = read(); if (0 < containers.size()) { logger.logWarning("{0} containers will be deleted.", containers.size()); for (final Container container : containers) { deleteLocal(container.getId()); } } final InternalBackupModel backupModel = getBackupModel(); final List<Container> backupContainers = backupModel.readContainers(); logger.logVariable("backupContainers.size()", backupContainers.size()); for (final Container backupContainer : backupContainers) { restore(backupContainer, new RestoreModel() { public InputStream openDocumentVersion(final UUID uniqueId, final Long versionId) { return backupModel.openDocumentVersion(uniqueId, versionId); } public List<ContainerVersion> readContainerVersions( final UUID uniqueId) { return backupModel.readContainerVersions(uniqueId); } public List<Document> readDocuments(final UUID uniqueId, final Long versionId) { return backupModel.readDocuments(uniqueId, versionId); } public List<DocumentVersion> readDocumentVersions( final UUID uniqueId, final Long versionId) { return backupModel.readDocumentVersions(uniqueId, versionId); } public Map<User, ArtifactReceipt> readPublishedTo( final UUID uniqueId, final Long versionId) { return backupModel.readPublishedTo(uniqueId, versionId); } public List<JabberId> readTeamIds(final UUID uniqueId) { return backupModel.readTeamIds(uniqueId); } }); } } catch (final Throwable t) { throw translateError(t); } }
1,114,487
private void flagKey(final Document document) throws ParityException { Assert.assertNotTrue( "flagKey(Document)", document.contains(ParityObjectFlag.KEY)); document.add(ParityObjectFlag.SEEN); update(document); }
private void flagKey(final Document document) throws ParityException { Assert.assertNotTrue( "flagKey(Document)", document.contains(ParityObjectFlag.KEY)); document.add(ParityObjectFlag.KEY); update(document); }
1,114,488
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document local file final LocalFile documentLocalFile = getLocalFile(document); documentLocalFile.read(); // create a new version\version content final DocumentVersion version = new DocumentVersion(); version.setArtifactId(documentId); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(document.getCreatedBy()); version.setCreatedOn(document.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(document.getUpdatedBy()); version.setUpdatedOn(document.getUpdatedOn()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(documentId); versionContent.setVersionId(version.getVersionId()); documentIO.createVersion(version, versionContent); // create the version local file final LocalFile versionLocalFile = getLocalFile(document, version); versionLocalFile.write(content.getContent()); versionLocalFile.lock(); // update the document updated by\on document.setUpdatedBy(preferences.getUsername()); document.setUpdatedOn(getTimestamp()); documentIO.update(document); // update the content bytes\checksum content.setContent(documentLocalFile.getFileBytes()); content.setChecksum(documentLocalFile.getFileChecksum()); documentIO.updateContent(content); // fire the object version event notification notifyCreation_objectVersionCreated(version); return version; } catch(IOException iox) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", rx); throw ParityErrorTranslator.translate(rx); } }
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document local file final LocalFile documentLocalFile = getLocalFile(document); documentLocalFile.read(); // create a new version\version content final DocumentVersion version = new DocumentVersion(); version.setArtifactId(documentId); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(document.getCreatedBy()); version.setCreatedOn(document.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(document.getUpdatedBy()); version.setUpdatedOn(document.getUpdatedOn()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(documentId); versionContent.setVersionId(version.getVersionId()); documentIO.createVersion(version, versionContent); // create the version local file final LocalFile versionLocalFile = getLocalFile(document, version); versionLocalFile.write(content.getContent()); versionLocalFile.lock(); // update the document updated by\on document.setUpdatedBy(preferences.getUsername()); document.setUpdatedOn(getTimestamp()); documentIO.update(document); // update the content bytes\checksum content.setContent(documentLocalFile.getFileBytes()); content.setChecksum(documentLocalFile.getFileChecksum()); documentIO.updateContent(content); // fire the object version event notification notifyCreation_objectVersionCreated(version); return version; } catch(IOException iox) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,489
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document local file final LocalFile documentLocalFile = getLocalFile(document); documentLocalFile.read(); // create a new version\version content final DocumentVersion version = new DocumentVersion(); version.setArtifactId(documentId); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(document.getCreatedBy()); version.setCreatedOn(document.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(document.getUpdatedBy()); version.setUpdatedOn(document.getUpdatedOn()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(documentId); versionContent.setVersionId(version.getVersionId()); documentIO.createVersion(version, versionContent); // create the version local file final LocalFile versionLocalFile = getLocalFile(document, version); versionLocalFile.write(content.getContent()); versionLocalFile.lock(); // update the document updated by\on document.setUpdatedBy(preferences.getUsername()); document.setUpdatedOn(getTimestamp()); documentIO.update(document); // update the content bytes\checksum content.setContent(documentLocalFile.getFileBytes()); content.setChecksum(documentLocalFile.getFileChecksum()); documentIO.updateContent(content); // fire the object version event notification notifyCreation_objectVersionCreated(version); return version; } catch(IOException iox) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", rx); throw ParityErrorTranslator.translate(rx); } }
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document local file final LocalFile documentLocalFile = getLocalFile(document); documentLocalFile.read(); // create a new version\version content final DocumentVersion version = new DocumentVersion(); version.setArtifactId(documentId); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(document.getCreatedBy()); version.setCreatedOn(document.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(document.getUpdatedBy()); version.setUpdatedOn(document.getUpdatedOn()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(documentId); versionContent.setVersionId(version.getVersionId()); documentIO.createVersion(version, versionContent); // create the version local file final LocalFile versionLocalFile = getLocalFile(document, version); versionLocalFile.write(content.getContent()); versionLocalFile.lock(); // update the document updated by\on document.setUpdatedBy(preferences.getUsername()); document.setUpdatedOn(getTimestamp()); documentIO.update(document); // update the content bytes\checksum content.setContent(documentLocalFile.getFileBytes()); content.setChecksum(documentLocalFile.getFileChecksum()); documentIO.updateContent(content); // fire the object version event notification notifyCreation_objectVersionCreated(version); return version; } catch(IOException iox) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,490
public Object internalGet( String key ) { // make the four scopes of the Apocalypse Read only if ( key.equals( REQUEST )) { return request; } else if( key.equals(RESPONSE) ) { return response; } else if ( key.equals(SESSION) ) { return session; } else if ( key.equals(APPLICATION)) { return application; } // search the toolbox Object o = null; if ( toolboxContext != null) { o = toolboxContext.get( key ); if ( o != null ) { return o; } } // try the local hashtable o = super.internalGet( key ); // if not found, wander down the scopes... if (o == null) { o = request.getAttribute( key ); if ( o == null && session != null ) { o = session.getAttribute( key ); if ( o == null ) { o = application.getAttribute( key ); } } } return o; }
public Object internalGet( String key ) { // make the four scopes of the Apocalypse Read only if ( key.equals( REQUEST )) { return request; } else if( key.equals(RESPONSE) ) { return response; } else if ( key.equals(SESSION) ) { return session; } else if ( key.equals(APPLICATION)) { return application; } // search the toolbox Object o = null; if ( toolboxContext != null) { o = toolboxContext.get( key ); if ( o != null ) { return o; } } // try the local hashtable o = super.internalGet( key ); // if not found, wander down the scopes... if (o == null) { o = request.getAttribute( key ); if ( o == null ) { o = session.getAttribute( key ); if ( o == null ) { o = application.getAttribute( key ); } } } return o; }
1,114,491
public Object internalGet( String key ) { // make the four scopes of the Apocalypse Read only if ( key.equals( REQUEST )) { return request; } else if( key.equals(RESPONSE) ) { return response; } else if ( key.equals(SESSION) ) { return session; } else if ( key.equals(APPLICATION)) { return application; } // search the toolbox Object o = null; if ( toolboxContext != null) { o = toolboxContext.get( key ); if ( o != null ) { return o; } } // try the local hashtable o = super.internalGet( key ); // if not found, wander down the scopes... if (o == null) { o = request.getAttribute( key ); if ( o == null && session != null ) { o = session.getAttribute( key ); if ( o == null ) { o = application.getAttribute( key ); } } } return o; }
public Object internalGet( String key ) { // make the four scopes of the Apocalypse Read only if ( key.equals( REQUEST )) { return request; } else if( key.equals(RESPONSE) ) { return response; } else if ( key.equals(SESSION) ) { return session; } else if ( key.equals(APPLICATION)) { return application; } // search the toolbox Object o = null; if ( toolboxContext != null) { o = toolboxContext.get( key ); if ( o != null ) { return o; } } // try the local hashtable o = super.internalGet( key ); // if not found, wander down the scopes... if (o == null) { o = request.getAttribute( key ); if ( o == null && session != null ) { if ( session != null ) { o = session.getAttribute( key ); } if ( o == null ) { o = application.getAttribute( key ); } } } return o; }
1,114,492
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %t %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
1,114,494
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %t %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
1,114,495
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %t %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
1,114,496
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %t %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
1,114,497
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
private void bootstrapLog4J() { final Properties logging = bootstrapLog4JConfig(mode); // console appender logging.setProperty("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); logging.setProperty("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern", "%d %p %m%n"); // default appender logging.setProperty("log4j.appender.DEFAULT", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.DEFAULT.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.DEFAULT.layout.ConversionPattern", "%d %p %m%n"); logging.setProperty("log4j.appender.DEFAULT.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity.log")); // sql appender logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp appender logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); // loggers switch (mode) { case DEMO: case PRODUCTION: logging.setProperty("log4j.rootLogger", "WARN, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "NONE"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case DEVELOPMENT: logging.setProperty("log4j.rootLogger", "INFO, CONSOLE, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; case TESTING: logging.setProperty("log4j.rootLogger", "INFO, DEFAULT"); logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.additivity.SQL_DEBUGGER", "false"); logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.additivity.XMPP_DEBUGGER", "false"); break; default: throw Assert.createUnreachable("Unknown operating mode."); } // renderers logging.setProperty("log4j.renderer.java.util.Calendar", "com.thinkparity.codebase.log4j.or.CalendarRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.util.xmpp.event.XMPPEvent", "com.thinkparity.codebase.model.util.logging.or.XMPPEventRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.Document", "com.thinkparity.codebase.model.util.logging.or.DocumentRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.document.DocumentVersion", "com.thinkparity.codebase.model.util.logging.or.DocumentVersionRenderer"); logging.setProperty("log4j.renderer.com.thinkparity.codebase.model.user.User", "com.thinkparity.codebase.model.util.logging.or.UserRenderer"); logging.setProperty("log4j.renderer.org.jivesoftware.smack.packet.Packet", "com.thinkparity.ophelia.model.util.logging.or.PacketRenderer"); LogManager.resetConfiguration(); PropertyConfigurator.configure(logging); new Log4JWrapper(getClass()).logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); }
1,114,498
private void doInitialize(final TestSession testSession) { doInititializeLogging(testSession); doInitializeStreams(testSession); }
private void doInitialize(final TestSession testSession) { bootstrapLog4J(testSession.getOutputDirectory()); doInitializeStreams(testSession); }
1,114,499
public void run() { window.open(avatar); }
public void run() { status.clearStatusMessage(area); }
1,114,501
public void run() { status.clearStatusMessage(area); }
public void run() { invoke(ActionId.PUBLISH_DOCUMENT, data); }
1,114,502
public List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } }
public List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } }
1,114,503
public List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } }
public List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId); } }
1,114,504
public MainProvider(final ArtifactModel artifactModel, final DocumentModel dModel, final SessionModel sModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = (Long) input; try { final Document document = dModel.get(documentId); return toDisplay(document, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> remote update ? later b4 earlier // +> last update ? later b4 earlier final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); return toDisplay(dModel.list(sort), artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.historyProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessageProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long systemMessageId = assertNotNullLong( "The main provider's system message provider " + "requires non-null java.lang.Long input.", input); final SystemMessage systemMessage; try { systemMessage = systemMessageModel.read(systemMessageId); } catch(final ParityException px) { throw new RuntimeException(px); } switch(systemMessage.getType()) { case INFO: case CONTACT_INVITATION: case CONTACT_INVITATION_RESPONSE: return systemMessage; case KEY_REQUEST: case KEY_RESPONSE: return null; default: throw Assert.createUnreachable("Unknown message type: " + systemMessage.getType()); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, historyProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
public MainProvider(final ArtifactModel artifactModel, final DocumentModel dModel, final SessionModel sModel, final SystemMessageModel systemMessageModel, final JabberId loggedInUserId) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = (Long) input; try { final Document document = dModel.get(documentId); return toDisplay(document, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> remote update ? later b4 earlier // +> last update ? later b4 earlier final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); return toDisplay(dModel.list(sort), artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.historyProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessageProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long systemMessageId = assertNotNullLong( "The main provider's system message provider " + "requires non-null java.lang.Long input.", input); final SystemMessage systemMessage; try { systemMessage = systemMessageModel.read(systemMessageId); } catch(final ParityException px) { throw new RuntimeException(px); } switch(systemMessage.getType()) { case INFO: case CONTACT_INVITATION: case CONTACT_INVITATION_RESPONSE: return systemMessage; case KEY_REQUEST: case KEY_RESPONSE: return null; default: throw Assert.createUnreachable("Unknown message type: " + systemMessage.getType()); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, historyProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
1,114,505
public MainProvider(final ArtifactModel artifactModel, final DocumentModel dModel, final SessionModel sModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = (Long) input; try { final Document document = dModel.get(documentId); return toDisplay(document, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> remote update ? later b4 earlier // +> last update ? later b4 earlier final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); return toDisplay(dModel.list(sort), artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.historyProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessageProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long systemMessageId = assertNotNullLong( "The main provider's system message provider " + "requires non-null java.lang.Long input.", input); final SystemMessage systemMessage; try { systemMessage = systemMessageModel.read(systemMessageId); } catch(final ParityException px) { throw new RuntimeException(px); } switch(systemMessage.getType()) { case INFO: case CONTACT_INVITATION: case CONTACT_INVITATION_RESPONSE: return systemMessage; case KEY_REQUEST: case KEY_RESPONSE: return null; default: throw Assert.createUnreachable("Unknown message type: " + systemMessage.getType()); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, historyProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
public MainProvider(final ArtifactModel artifactModel, final DocumentModel dModel, final SessionModel sModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = (Long) input; try { final Document document = dModel.get(documentId); return toDisplay(document, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> remote update ? later b4 earlier // +> last update ? later b4 earlier final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); return toDisplay(dModel.list(sort), artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.historyProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, loggedInUserId, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessageProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long systemMessageId = assertNotNullLong( "The main provider's system message provider " + "requires non-null java.lang.Long input.", input); final SystemMessage systemMessage; try { systemMessage = systemMessageModel.read(systemMessageId); } catch(final ParityException px) { throw new RuntimeException(px); } switch(systemMessage.getType()) { case INFO: case CONTACT_INVITATION: case CONTACT_INVITATION_RESPONSE: return systemMessage; case KEY_REQUEST: case KEY_RESPONSE: return null; default: throw Assert.createUnreachable("Unknown message type: " + systemMessage.getType()); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, historyProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
1,114,506
public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } }
public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, loggedInUserId, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } }
1,114,507
private void triggerOnline(final Browser application, final JPopupMenu jPopupMenu, final MouseEvent e) { if(document.isUrgent()) { final List<KeyRequest> keyRequests = document.getKeyRequests(); if(keyRequests.size() >= 1) { final Set<JabberId> requestedBySet = new HashSet<JabberId>(); for(final KeyRequest keyRequest : keyRequests) { // if a single user has requested more than once; we only // display one menu item. if(!requestedBySet.contains(keyRequest.getRequestedBy())) { jPopupMenu.add(new AcceptKeyRequest(application, keyRequest.getId(), keyRequest.getRequestedByName())); requestedBySet.add(keyRequest.getRequestedBy()); } } jPopupMenu.addSeparator(); jPopupMenu.add(new DeclineAllKeyRequests(application)); } } jPopupMenu.add(new Open(application)); jPopupMenu.add(new AddNewTeamMember(application)); if(document.isKeyHolder()) { if(!document.isWorkingVersionEqual()) jPopupMenu.add(new Publish(application)); final Set<User> team = document.getTeam(); System.out.println("[LBROWSER] [APPLICATION] [BROWSER] [DISPLAY] [AVATAR] [POPUP DOCUMENT] [TRIGGER ONLINE] [TEAM SIZE] [" + team.size() + "]"); if(0 < team.size()) { final JMenu jMenu = MenuFactory.create(getString("SendKey")); for(final User teamMember : team) jMenu.add(new SendKey(application, teamMember)); jPopupMenu.add(jMenu); } } else { jPopupMenu.add(new RequestKey(application)); } jPopupMenu.add(new Close(application)); jPopupMenu.addSeparator(); jPopupMenu.add(new Delete(application)); // DEBUG Document Menu Options if(e.isShiftDown()) { final Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); final ActionListener debugActionListener = new ActionListener() { public void actionPerformed(final ActionEvent e) { final StringSelection stringSelection = new StringSelection(((JComponent) e.getSource()).getClientProperty("COPY_ME").toString()); systemClipboard.setContents(stringSelection, null); } }; final JMenuItem idJMenuItem = new JMenuItem("Id - " + document.getId()); idJMenuItem.putClientProperty("COPY_ME", document.getId()); idJMenuItem.addActionListener(debugActionListener); final JMenuItem uidJMenuItem = new JMenuItem("Unique id - " + document.getUniqueId()); uidJMenuItem.putClientProperty("COPY_ME", document.getUniqueId()); uidJMenuItem.addActionListener(debugActionListener); jPopupMenu.addSeparator(); jPopupMenu.add(idJMenuItem); jPopupMenu.add(uidJMenuItem); } }
private void triggerOnline(final Browser application, final JPopupMenu jPopupMenu, final MouseEvent e) { if(document.isUrgent()) { final List<KeyRequest> keyRequests = document.getKeyRequests(); if(keyRequests.size() >= 1) { final Set<JabberId> requestedBySet = new HashSet<JabberId>(); for(final KeyRequest keyRequest : keyRequests) { // if a single user has requested more than once; we only // display one menu item. if(!requestedBySet.contains(keyRequest.getRequestedBy())) { jPopupMenu.add(new AcceptKeyRequest(application, keyRequest.getId(), keyRequest.getRequestedByName())); requestedBySet.add(keyRequest.getRequestedBy()); } } jPopupMenu.addSeparator(); } } jPopupMenu.add(new Open(application)); jPopupMenu.add(new AddNewTeamMember(application)); if(document.isKeyHolder()) { if(!document.isWorkingVersionEqual()) jPopupMenu.add(new Publish(application)); final Set<User> team = document.getTeam(); System.out.println("[LBROWSER] [APPLICATION] [BROWSER] [DISPLAY] [AVATAR] [POPUP DOCUMENT] [TRIGGER ONLINE] [TEAM SIZE] [" + team.size() + "]"); if(0 < team.size()) { final JMenu jMenu = MenuFactory.create(getString("SendKey")); for(final User teamMember : team) jMenu.add(new SendKey(application, teamMember)); jPopupMenu.add(jMenu); } } else { jPopupMenu.add(new RequestKey(application)); } jPopupMenu.add(new Close(application)); jPopupMenu.addSeparator(); jPopupMenu.add(new Delete(application)); // DEBUG Document Menu Options if(e.isShiftDown()) { final Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); final ActionListener debugActionListener = new ActionListener() { public void actionPerformed(final ActionEvent e) { final StringSelection stringSelection = new StringSelection(((JComponent) e.getSource()).getClientProperty("COPY_ME").toString()); systemClipboard.setContents(stringSelection, null); } }; final JMenuItem idJMenuItem = new JMenuItem("Id - " + document.getId()); idJMenuItem.putClientProperty("COPY_ME", document.getId()); idJMenuItem.addActionListener(debugActionListener); final JMenuItem uidJMenuItem = new JMenuItem("Unique id - " + document.getUniqueId()); uidJMenuItem.putClientProperty("COPY_ME", document.getUniqueId()); uidJMenuItem.addActionListener(debugActionListener); jPopupMenu.addSeparator(); jPopupMenu.add(idJMenuItem); jPopupMenu.add(uidJMenuItem); } }
1,114,508
public void paintComponent(Graphics g) { int earthRadius = 50; Dimension d = getSize(); g.setColor(new Color((float) 0.0, (float) 0.0, (float) 0.0, (float) 0.01)); // g.setColor(Color.black); g.fillRect(0, 0, d.width, d.height); g.setColor(getForeground()); g.drawOval((d.width - earthRadius) / 2, (d.height - earthRadius) / 2, earthRadius, earthRadius); /* for (int i = earthRadius * 2; i < d.width; i += 25) { g.drawOval((d.width - i) / 2, (d.height - i) / 2, i, i); } */ synchronized (particles) { Iterator<Entry<String, Particle>> i = particles.entrySet() .iterator(); while (i.hasNext()) { Entry<String, Particle> e = i.next(); Particle p = e.getValue(); if (!p.crashed()) drawParticle(g, p); } } Iterator<Entry<String, Attractor>> j = attractors.entrySet().iterator(); g.setColor(getForeground()); while (j.hasNext()) { Entry<String, Attractor> e = j.next(); Point2d p = e.getValue().location.toCartesianPoint(); p.add(new Point2d(d.width / 2, d.height / 2)); int x = new Double(p.x).intValue(); int y = new Double(p.y).intValue(); g.drawOval(x - 5, y - 5, 10, 10); g.drawString(e.getKey(), x + 15, y); } g.drawString("Number of particles: " + particles.size(), 15, 15); g.drawString("Frame: " + frame, 15, 30); }
public void paintComponent(Graphics g) { int earthRadius = 50; Dimension d = getSize(); if (firstFrame) { firstFrame = false; g.setColor(getBackground()); g.fillRect(0, 0, d.width, d.height); } g.setColor(new Color((float) 0.0, (float) 0.0, (float) 0.0, (float) 0.01)); // g.setColor(Color.black); g.fillRect(0, 0, d.width, d.height); g.setColor(getForeground()); g.drawOval((d.width - earthRadius) / 2, (d.height - earthRadius) / 2, earthRadius, earthRadius); /* for (int i = earthRadius * 2; i < d.width; i += 25) { g.drawOval((d.width - i) / 2, (d.height - i) / 2, i, i); } */ synchronized (particles) { Iterator<Entry<String, Particle>> i = particles.entrySet() .iterator(); while (i.hasNext()) { Entry<String, Particle> e = i.next(); Particle p = e.getValue(); if (!p.crashed()) drawParticle(g, p); } } Iterator<Entry<String, Attractor>> j = attractors.entrySet().iterator(); g.setColor(getForeground()); while (j.hasNext()) { Entry<String, Attractor> e = j.next(); Point2d p = e.getValue().location.toCartesianPoint(); p.add(new Point2d(d.width / 2, d.height / 2)); int x = new Double(p.x).intValue(); int y = new Double(p.y).intValue(); g.drawOval(x - 5, y - 5, 10, 10); g.drawString(e.getKey(), x + 15, y); } g.drawString("Number of particles: " + particles.size(), 15, 15); g.drawString("Frame: " + frame, 15, 30); }
1,114,509
public String getID() { return getProperty(keyIdentifier); }
public String getID() { return getStringProperty(keyIdentifier); }
1,114,511
public void launch() { velocity.theta = -2.0; velocity.r = 40.0 + Math.random(); accel.theta = 0.5; accel.r = -7.5 - Math.random(); state = STATE_LAUNCH; }
public void launch() { velocity.theta = -2.0; accel.theta = 0.5; accel.r = -7.5 - Math.random(); state = STATE_LAUNCH; }
1,114,512
public void launch() { velocity.theta = -2.0; velocity.r = 40.0 + Math.random(); accel.theta = 0.5; accel.r = -7.5 - Math.random(); state = STATE_LAUNCH; }
public void launch() { velocity.theta = -2.0; velocity.r = 40.0 + Math.random(); accel.theta = 0.75; accel.r = -7.5 - Math.random(); state = STATE_LAUNCH; }
1,114,513
void login(final String username, final String password) throws ParityException { logger.info("login(String,String)"); logger.debug(username); logger.debug(mask(password)); final String host = preferences.getServerHost(); final Integer port = preferences.getServerPort(); synchronized(xmppHelperLock) { try { // check that the preferences username matches the username // supplied if(preferences.isSetUsername()) { Assert.assertTrue( ASSERT_USERNAME_EQUALS_PREFS, username.equals(preferences.getUsername())); } // login xmppHelper.login(host, port, username, password); // set the username@host in the preferences if(!preferences.isSetUsername()) { preferences.setUsername(username); } } catch(SmackException sx) { logger.error("login(String,String)", sx); throw ParityErrorTranslator.translate(sx); } catch(RuntimeException rx) { logger.error("login(String,String)", rx); throw ParityErrorTranslator.translate(rx); } } }
void login(final String username, final String password) throws ParityException { logger.info("login(String,String)"); logger.debug(username); logger.debug(mask(password)); final String host = preferences.getServerHost(); final Integer port = preferences.getServerPort(); synchronized(xmppHelperLock) { try { // check that the preferences username matches the username // supplied if(preferences.isSetUsername()) { Assert.assertTrue( formatAssertUsernameEqualsPreferences(username), username.equals(preferences.getUsername())); } // login xmppHelper.login(host, port, username, password); // set the username@host in the preferences if(!preferences.isSetUsername()) { preferences.setUsername(username); } } catch(SmackException sx) { logger.error("login(String,String)", sx); throw ParityErrorTranslator.translate(sx); } catch(RuntimeException rx) { logger.error("login(String,String)", rx); throw ParityErrorTranslator.translate(rx); } } }
1,114,515
public WorkspaceImpl(final File workspace) { super(); this.logger = Logger.getLogger(getClass()); this.mode = Mode.valueOf(System.getProperty("thinkparity.mode")); this.workspace = initRoot(workspace); bootstrapLogging(); }
public WorkspaceImpl(final File workspace) { super(); this.logger = Logger.getLogger(getClass()); this.mode = Mode.valueOf(System.getProperty("thinkparity.mode")); this.workspace = initRoot(workspace); bootstrapLog4J(); }
1,114,517
private ConfirmDialog() { super("ConfirmDialog"); initComponents(); }
private ConfirmDialog() { super("ConfirmDialog"); initComponents(); }
1,114,518
protected AbstractXMPP(final XMPPCore xmppCore) { super(); this.listeners = new ArrayList<T>(); this.logger = new Log4JWrapper(); this.xmppCore = xmppCore; this.xstream = new XStream(); }
protected AbstractXMPP(final XMPPCore xmppCore) { super(); this.listeners = new ArrayList<T>(); this.logger = new Log4JWrapper(StackUtil.getCallerClassName()); this.xmppCore = xmppCore; this.xstream = new XStream(); }
1,114,519
protected void notifyListeners(final EventNotifier<T> notifier) { synchronized (listeners) { for (final T listener : listeners) { notifier.notifyListener(listener); } } }
protected void notifyListeners(final EventNotifier<T> notifier) { synchronized (listeners) { for (final T listener : listeners) { try { notifier.notifyListener(listener); } catch (final Throwable t) { logger.logError(t, "Could not handle remote event {0} for listener {1}.", notifier, listener); } } } }
1,114,522
public AirBrush(String plugname, String hostname, Integer port) { connect(plugname, hostname, port); }
public AirBrush(String plugname, String hostname, Integer port) { connect(plugname, hostname, port); }
1,114,525
public void service() { logApiId(); final List<JabberId> teamIds = logVariable("teamIds", readTeamIds(readUUID("uniqueId"))); writeJabberIds("teamIds", "teamIds", teamIds); }
public void service() { logApiId(); final List<JabberId> teamIds = logger.logVariable("teamIds", readTeamIds(readUUID("uniqueId"))); writeJabberIds("teamIds", "teamIds", teamIds); }
1,114,526
private void reloadInfo() { infoJLabel.setText(getString("Info.Empty")); if(isTestMode()) { final Contact contact = getContact(); final Object[] infoParityUserArguments = new Object[] { contact.getFirstName(), contact.getLastName(), contact.getOrganization() }; final StringBuffer buffer = new StringBuffer(getString("Info.Contact", infoParityUserArguments)) .append(infoJLabel.getText()); infoJLabel.setText(buffer.toString()); } }
private void reloadInfo() { infoJLabel.setText(getString("Info.Empty")); if(getController().isFilterEnabled()) { infoJLabel.setText(getString("Info.FilterOn")); } else if(isTestMode()) { final Contact contact = getContact(); final Object[] infoParityUserArguments = new Object[] { contact.getFirstName(), contact.getLastName(), contact.getOrganization() }; final StringBuffer buffer = new StringBuffer(getString("Info.Contact", infoParityUserArguments)) .append(infoJLabel.getText()); infoJLabel.setText(buffer.toString()); } }
1,114,527
private Long insertTestDataLibrary(final HypersonicSession session, final Library.Type type, final String groupId, final String artifactId, final String version, final String path, final Calendar createdOn, final byte[] bytes) { session.prepareStatement(INSERT_TEST_DATA_LIBRARY); session.setTypeAsInteger(1, type); session.setString(2, groupId); session.setString(3, artifactId); session.setString(4, version); session.setString(5, path); session.setCalendar(5, createdOn); if(1 != session.executeUpdate()) throw new HypersonicException("[RMIGRATOR] [IO] [UTIL] [HYPERSONIC MIGRATOR] [CANNOT INSERT LIBRARY TEST DATA]"); final Long libraryId = session.getIdentity(); session.prepareStatement(INSERT_TEST_DATA_LIBRARY_BYTES); session.setLong(1, libraryId); session.setBytes(2, bytes); session.setString(3, ChecksumUtil.md5Hex(bytes)); if(1 != session.executeUpdate()) throw new HypersonicException("[RMIGRATOR] [IO] [UTIL] [HYPERSONIC MIGRATOR] [CANNOT INSERT LIBRARY BYTES TEST DATA"); return libraryId; }
private Long insertTestDataLibrary(final HypersonicSession session, final Library.Type type, final String groupId, final String artifactId, final String version, final String path, final Calendar createdOn, final byte[] bytes) { session.prepareStatement(INSERT_TEST_DATA_LIBRARY); session.setTypeAsInteger(1, type); session.setString(2, groupId); session.setString(3, artifactId); session.setString(4, version); session.setString(5, path); session.setCalendar(6, createdOn); if(1 != session.executeUpdate()) throw new HypersonicException("[RMIGRATOR] [IO] [UTIL] [HYPERSONIC MIGRATOR] [CANNOT INSERT LIBRARY TEST DATA]"); final Long libraryId = session.getIdentity(); session.prepareStatement(INSERT_TEST_DATA_LIBRARY_BYTES); session.setLong(1, libraryId); session.setBytes(2, bytes); session.setString(3, ChecksumUtil.md5Hex(bytes)); if(1 != session.executeUpdate()) throw new HypersonicException("[RMIGRATOR] [IO] [UTIL] [HYPERSONIC MIGRATOR] [CANNOT INSERT LIBRARY BYTES TEST DATA"); return libraryId; }
1,114,528
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,529
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,530
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,531
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); fillTopJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,532
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(fillTopJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,533
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,534
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); setOpaque(false); containerJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_LeftmostTabSelected.png"))); containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; add(containerJLabel, gridBagConstraints); contactJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/BrowserTitle_Tab.png"))); contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 0); add(contactJLabel, gridBagConstraints); nameJLabel.setFont(Fonts.DefaultFontBold); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 6, 2, 0); add(nameJLabel, gridBagConstraints); fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; add(fillRightJLabel, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
1,114,535
private void reloadDisplay() { reloadDisplayTab(); reloadDisplayName(); }
private void reloadDisplay() { reloadDisplayTab(); reloadDisplayName(); }
1,114,536
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = currentDateTime(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,538
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,539
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.applyFlagKey(document.getId()); iAModel.applyFlagSeen(document.getId()); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,540
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event final Document d = get(document.getId()); notifyCreation_objectCreated(d); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,541
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,542
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return document; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Centralize business rules about document creation. "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); Assert.assertTrue( "create(Project,String,String,File)", (file.length() <= IParityModelConstants.FILE_SIZE_UPPER_BOUNDS)); try { final Calendar now = getTimestamp(); final Document document = new Document(preferences.getUsername(), now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now); document.setState(ArtifactState.ACTIVE); final byte[] contentBytes = FileUtil.readBytes(file); final DocumentContent content = new DocumentContent(); content.setContent(contentBytes); content.setChecksum(MD5Util.md5Hex(contentBytes)); content.setDocumentId(document.getId()); // send a creation packet final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); iSessionModel.sendCreate(document); // create the document documentIO.create(document, content); // create the local file final LocalFile localFile = getLocalFile(document); localFile.write(contentBytes); // create a version createVersion(document.getId()); // flag the document as having been seen. flagAsSEEN(document); // fire a creation event notifyCreation_objectCreated(document); // audit the creation final Document d = get(document.getId()); auditor.create(d.getId(), JabberIdBuilder.parseUsername(preferences.getUsername()), d.getCreatedOn()); return d; } catch(IOException iox) { logger.error("createDocument(Document)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createDocument(Document)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,543
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document local file final LocalFile localFile = getLocalFile(document); localFile.read(); content.setChecksum(localFile.getFileChecksum()); content.setContent(localFile.getFileBytes()); // create a new version\version content final DocumentVersion version = new DocumentVersion(); version.setArtifactId(documentId); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(document.getCreatedBy()); version.setCreatedOn(document.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(document.getUpdatedBy()); version.setUpdatedOn(document.getUpdatedOn()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(documentId); versionContent.setVersionId(version.getVersionId()); documentIO.createVersion(version, versionContent); // create the version local file final LocalFile versionLocalFile = getLocalFile(document, version); versionLocalFile.write(content.getContent()); versionLocalFile.lock(); // update the document updated by\on document.setUpdatedBy(preferences.getUsername()); document.setUpdatedOn(getTimestamp()); documentIO.update(document); // update the content bytes\checksum content.setContent(localFile.getFileBytes()); content.setChecksum(localFile.getFileChecksum()); documentIO.updateContent(content); // fire the object version event notification notifyCreation_objectVersionCreated(version); return version; } catch(IOException iox) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", rx); throw ParityErrorTranslator.translate(rx); } }
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document local file final LocalFile localFile = getLocalFile(document); localFile.read(); content.setChecksum(localFile.getFileChecksum()); content.setContent(localFile.getFileBytes()); // create a new version\version content final DocumentVersion version = new DocumentVersion(); version.setArtifactId(documentId); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(document.getCreatedBy()); version.setCreatedOn(document.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(document.getUpdatedBy()); version.setUpdatedOn(document.getUpdatedOn()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(documentId); versionContent.setVersionId(version.getVersionId()); documentIO.createVersion(version, versionContent); // create the version local file final LocalFile versionLocalFile = getLocalFile(document, version); versionLocalFile.write(content.getContent()); versionLocalFile.lock(); // update the document updated by\on document.setUpdatedBy(preferences.getUsername()); document.setUpdatedOn(currentDateTime()); documentIO.update(document); // update the content bytes\checksum content.setContent(localFile.getFileBytes()); content.setChecksum(localFile.getFileChecksum()); documentIO.updateContent(content); // fire the object version event notification notifyCreation_objectVersionCreated(version); return version; } catch(IOException iox) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("createVersion(Document,DocumentAction,DocumentActionData)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,544
void open(final Long documentId) throws ParityException { logger.info("open(Long)"); logger.debug(documentId); try { final Document document = get(documentId); // open the local file final LocalFile localFile = getLocalFile(document); localFile.open(); // flag it as having been seen flagAsSEEN(document); } catch(IOException iox) { logger.error("open(UUID)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("open(UUID)", rx); throw ParityErrorTranslator.translate(rx); } }
void open(final Long documentId) throws ParityException { logger.info("[LMODEL] [DOCUMENT] [OPEN]"); logger.debug(documentId); try { final Document document = get(documentId); // open the local file final LocalFile localFile = getLocalFile(document); localFile.open(); // flag it as having been seen flagAsSEEN(document); } catch(IOException iox) { logger.error("open(UUID)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("open(UUID)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,545
void open(final Long documentId) throws ParityException { logger.info("open(Long)"); logger.debug(documentId); try { final Document document = get(documentId); // open the local file final LocalFile localFile = getLocalFile(document); localFile.open(); // flag it as having been seen flagAsSEEN(document); } catch(IOException iox) { logger.error("open(UUID)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("open(UUID)", rx); throw ParityErrorTranslator.translate(rx); } }
void open(final Long documentId) throws ParityException { logger.info("open(Long)"); logger.debug(documentId); try { final Document document = get(documentId); // open the local file final LocalFile localFile = getLocalFile(document); localFile.open(); // flag it as having been seen final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.applyFlagSeen(documentId); } catch(IOException iox) { logger.error("open(UUID)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("open(UUID)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,546
void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { final JabberId receivedFromJabberId = JabberIdBuilder.parseUsername(xmppDocument.getReceivedFrom()); Document document = get(xmppDocument.getUniqueId()); logger.debug(document); if(null == document) { document = receiveCreate(xmppDocument); } else { receiveUpdate(xmppDocument, document); } // audit the receiving auditor.recieve(document.getId(), xmppDocument.getVersionId(), receivedFromJabberId, JabberIdBuilder.parseUsername(preferences.getUsername()), xmppDocument.getUpdatedOn()); } catch(IOException iox) { logger.error("receiveDocument(XMPPDocument)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("receiveDocument(XMPPDocument)", rx); throw ParityErrorTranslator.translate(rx); } }
void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { final JabberId receivedFromJabberId = JabberIdBuilder.parseUsername(xmppDocument.getReceivedFrom()); Document document = get(xmppDocument.getUniqueId()); logger.debug(document); if(null == document) { document = receiveCreate(xmppDocument); } else { final DocumentVersion version = getVersion(document.getId(), xmppDocument.getVersionId()); if(null == version) { receiveUpdate(xmppDocument, document); } } // audit the receiving auditor.recieve(document.getId(), xmppDocument.getVersionId(), receivedFromJabberId, JabberIdBuilder.parseUsername(preferences.getUsername()), xmppDocument.getUpdatedOn()); } catch(IOException iox) { logger.error("receiveDocument(XMPPDocument)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("receiveDocument(XMPPDocument)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,547
void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { final JabberId receivedFromJabberId = JabberIdBuilder.parseUsername(xmppDocument.getReceivedFrom()); Document document = get(xmppDocument.getUniqueId()); logger.debug(document); if(null == document) { document = receiveCreate(xmppDocument); } else { receiveUpdate(xmppDocument, document); } // audit the receiving auditor.recieve(document.getId(), xmppDocument.getVersionId(), receivedFromJabberId, JabberIdBuilder.parseUsername(preferences.getUsername()), xmppDocument.getUpdatedOn()); } catch(IOException iox) { logger.error("receiveDocument(XMPPDocument)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("receiveDocument(XMPPDocument)", rx); throw ParityErrorTranslator.translate(rx); } }
void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { final JabberId receivedFromJabberId = JabberIdBuilder.parseUsername(xmppDocument.getReceivedFrom()); Document document = get(xmppDocument.getUniqueId()); logger.debug(document); if(null == document) { document = receiveCreate(xmppDocument); } else { receiveUpdate(xmppDocument, document); } // audit the receiving auditor.recieve(document.getId(), xmppDocument.getVersionId(), receivedFromJabberId, JabberIdBuilder.parseUsername(preferences.getUsername()), xmppDocument.getUpdatedOn()); } catch(IOException iox) { logger.error("receiveDocument(XMPPDocument)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("receiveDocument(XMPPDocument)", rx); throw ParityErrorTranslator.translate(rx); } }
1,114,548
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(xmppDocument.getCreatedBy()); version.setCreatedOn(xmppDocument.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(xmppDocument.getUpdatedBy()); version.setUpdatedOn(xmppDocument.getUpdatedOn()); version.setVersionId(xmppDocument.getVersionId()); final DocumentContent content = new DocumentContent(); content.setChecksum(MD5Util.md5Hex(xmppDocument.getContent())); content.setContent(xmppDocument.getContent()); content.setDocumentId(version.getArtifactId()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(version.getArtifactId()); versionContent.setVersionId(version.getVersionId()); insertVersion(version.getArtifactId(), version, versionContent); if(isLatestLocalVersion(version)) { document.setUpdatedBy(xmppDocument.getUpdatedBy()); document.setUpdatedOn(xmppDocument.getUpdatedOn()); // update the db documentIO.update(document); documentIO.updateContent(content); // update the local file final LocalFile localFile = getLocalFile(document); localFile.delete(); localFile.write(content.getContent()); } // if not the key holder lock final InternalSessionModel iSModel = getInternalSessionModel(); if(!iSModel.isLoggedInUserKeyHolder(document.getId())) lock(document.getId()); // flag the document flagAsNotSEEN(document); // notify notifyUpdate_objectReceived(document); }
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(xmppDocument.getCreatedBy()); version.setCreatedOn(xmppDocument.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(xmppDocument.getUpdatedBy()); version.setUpdatedOn(xmppDocument.getUpdatedOn()); version.setVersionId(xmppDocument.getVersionId()); final DocumentContent content = new DocumentContent(); content.setChecksum(MD5Util.md5Hex(xmppDocument.getContent())); content.setContent(xmppDocument.getContent()); content.setDocumentId(version.getArtifactId()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(version.getArtifactId()); versionContent.setVersionId(version.getVersionId()); insertVersion(version.getArtifactId(), version, versionContent); if(isLatestLocalVersion(version)) { document.setUpdatedBy(xmppDocument.getUpdatedBy()); document.setUpdatedOn(xmppDocument.getUpdatedOn()); // update the db documentIO.update(document); documentIO.updateContent(content); // update the local file final LocalFile localFile = getLocalFile(document); localFile.delete(); localFile.write(content.getContent()); } // if not the key holder lock final InternalSessionModel iSModel = getInternalSessionModel(); if(!iSModel.isLoggedInUserKeyHolder(document.getId())) lock(document.getId()); // flag the document flagAsNotSEEN(document); // notify notifyUpdate_objectReceived(document); }
1,114,549
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(xmppDocument.getCreatedBy()); version.setCreatedOn(xmppDocument.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(xmppDocument.getUpdatedBy()); version.setUpdatedOn(xmppDocument.getUpdatedOn()); version.setVersionId(xmppDocument.getVersionId()); final DocumentContent content = new DocumentContent(); content.setChecksum(MD5Util.md5Hex(xmppDocument.getContent())); content.setContent(xmppDocument.getContent()); content.setDocumentId(version.getArtifactId()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(version.getArtifactId()); versionContent.setVersionId(version.getVersionId()); insertVersion(version.getArtifactId(), version, versionContent); if(isLatestLocalVersion(version)) { document.setUpdatedBy(xmppDocument.getUpdatedBy()); document.setUpdatedOn(xmppDocument.getUpdatedOn()); // update the db documentIO.update(document); documentIO.updateContent(content); // update the local file final LocalFile localFile = getLocalFile(document); localFile.delete(); localFile.write(content.getContent()); } // if not the key holder lock final InternalSessionModel iSModel = getInternalSessionModel(); if(!iSModel.isLoggedInUserKeyHolder(document.getId())) lock(document.getId()); // flag the document flagAsNotSEEN(document); // notify notifyUpdate_objectReceived(document); }
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(xmppDocument.getCreatedBy()); version.setCreatedOn(xmppDocument.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(xmppDocument.getUpdatedBy()); version.setUpdatedOn(xmppDocument.getUpdatedOn()); version.setVersionId(xmppDocument.getVersionId()); final DocumentContent content = new DocumentContent(); content.setChecksum(MD5Util.md5Hex(xmppDocument.getContent())); content.setContent(xmppDocument.getContent()); content.setDocumentId(version.getArtifactId()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(version.getArtifactId()); versionContent.setVersionId(version.getVersionId()); insertVersion(version.getArtifactId(), version, versionContent); if(isLatestLocalVersion(version)) { document.setUpdatedBy(xmppDocument.getUpdatedBy()); document.setUpdatedOn(xmppDocument.getUpdatedOn()); // update the db documentIO.update(document); documentIO.updateContent(content); // update the local file final LocalFile localFile = getLocalFile(document); localFile.delete(); localFile.write(content.getContent()); } // if not the key holder lock final InternalSessionModel iSModel = getInternalSessionModel(); if(!iSModel.isLoggedInUserKeyHolder(document.getId())) lock(document.getId()); // flag the document final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.removeFlagSeen(document.getId()); // notify notifyUpdate_objectReceived(document); }
1,114,550
private JPopupMenu doCreatePopup() { return new JPopupMenu(); }
private JPopupMenu doCreatePopup() { JPopupMenu jPopupMenu = new JPopupMenu(); jPopupMenu.addPopupMenuListener(new PopupMenuListener() { public void popupMenuCanceled(PopupMenuEvent e) { } public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { final Timer popupTimer = new Timer(PopupMenuInfo.ACTIVATION_DELAY, new ActionListener() { public void actionPerformed(final ActionEvent timerEvent) { popupMenuCount--; } }); popupTimer.setRepeats(false); popupTimer.start(); } public void popupMenuWillBecomeVisible(PopupMenuEvent e) { popupMenuCount++; } }); return jPopupMenu; }
1,114,552
private void debugLongParameters(final String listName, final String name, final List<Long> values) {}
private void debugLongParameters(final String listName, final String name, final List<Long> values) {}
1,114,554
final void setLongParameters(final String listName, final String name, final List<Long> values) { final List<Parameter> parameters = new LinkedList<Parameter>(); for(final Long value : values) parameters.add(new Parameter(name, Long.class, value)); this.parameters.add(new Parameter(listName, List.class, parameters)); }
public final void setLongParameters(final String listName, final String name, final List<Long> values) { final List<Parameter> parameters = new LinkedList<Parameter>(); for(final Long value : values) parameters.add(new Parameter(name, Long.class, value)); this.parameters.add(new Parameter(listName, List.class, parameters)); }
1,114,555
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
1,114,556
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Colors.Browser.List.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
1,114,557
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Colors.Browser.List.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
1,114,558
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Swing.LIST_ODD_BG); } } return this; }
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG); } else { setForeground(Swing.LIST_FG); if (0 == index % 2) { setBackground(Swing.LIST_EVEN_BG); } else { setBackground(Colors.Browser.List.LIST_ODD_BG); } } return this; }
1,114,559