Package org.jitterbit.integration.common.server

Examples of org.jitterbit.integration.common.server.ServerGuid


        }
    }

    private void removeDuplicateServers(ServerInfo server) {
        String serverName = server.getName();
        ServerGuid serverId = server.getGuid();
        ServerInformationStore infoStore = getInformationStore();
        for (KnownServer s : infoStore.getRegisteredServers()) {
            ServerInfo info = s.getServerInfo();
            if (info.getName().equals(serverName) && !info.getGuid().equals(serverId)) {
                infoStore.removeServerRegistration(info.getGuid());
View Full Code Here


        @Override
        public boolean accept(File pathname) {
            if (pathname.isDirectory()) {
                try {
                    new ServerGuid(pathname.getName());
                    return true;
                } catch (IllegalArgumentException e) {
                    // The sub-directory is not a sever directory.
                }
            }
View Full Code Here

        }
       
        @Override
        public Object[] getColumnDataFromObject(KnownServer props) {
            ServerInfo info = props.getServerInfo();
            ServerGuid guid = info.getGuid();
            return new Object[] {
                new ServerName(serverManager, info.getName(), guid),
                info.getVersion(),
                info.getPlatform().getOS(),
                guid,
View Full Code Here

        }
       
        @Override
        public Object[] getColumnDataFromObject(KnownServer props) {
            ServerInfo info = props.getServerInfo();
            ServerGuid guid = info.getGuid();
            return new Object[] {
                new ServerName(serverManager, info.getName(), guid),
                info.getVersion(),
                info.getPlatform().getOS(),
                new DateCell(props.getDateOfLatestLogin()),
View Full Code Here

        return checkServer(users) && checkServer(groups);
    }
   
    private boolean checkServer(List<? extends ServerItem> items) {
        for (ServerItem item : items) {
            ServerGuid id = item.getServerGuid();
            if (id != null && !id.equals(serverInfo.getGuid())) {
                String msg = WebServiceMessages.getMessage("UserAdmin.Upload.ServerMismatch");
                KnownServer server = serverManager.getKnownServer(id);
                if (server != null) {
                    msg += " " + WebServiceMessages.getFormattedMessage("UserAdmin.Upload.Login",
                            new Object[] { server.getServerInfo().getName() });
View Full Code Here

        if (s == null) {
            // This is needed for backwards compability: This class was
            // introduced in version 0.9.5.
            s = file.getParentFile().getName();
        }
        return new ServerGuid(s);
    }
View Full Code Here

public final class ServerInfoJUnitTest {

    @Test
    public void ensureSerializationWorks() {
        ServerInfo info = new ServerInfo(
                        new ServerGuid(UUID.randomUUID().toString()),
                        "localhost",
                        VersionFactory.newVersion(1, 2, 3),
                        ServerPlatform.fromOSAndSystemInfo("Windows", "Vista"));
        byte[] bytes = SerializationUtils.serialize(info);
        Object restored = SerializationUtils.deserialize(bytes);
View Full Code Here

     *            cache.
     * @return the created <code>DatabaseDriverCache</code> instance.
     */
    @Override
    public DatabaseDriverCache createCache(ServerInfo server) {
        ServerGuid serverId = server.getGuid();
        File dir = cacheRoot.getLocation(serverId);
        DatabaseDriverCache cache = new DatabaseDriverCache(serverId, dir);
        addCache(serverId, cache);
        return cache;
    }
View Full Code Here

    private void loadServer(KnownServer s) {
        File dir = cacheRoot.getLocation(s.getServerInfo().getGuid());
        String name = dir.getName();
        try {
            ServerGuid serverId = new ServerGuid(name);
            DatabaseDriverCache cache = new DatabaseDriverCache(serverId, dir);
            loadCacheForServer(cache, serverId, dir);
        } catch (IllegalArgumentException ex) {
            // This happens if the application's server directory contains folders that are not
            // "server" folders, i.e. folders with names that are not valid server GUIDs. This
View Full Code Here

     *            a <code>ServerInfo</code> instance representing the server that should be selected
     *            in the combobox, or <code>null</code> to clear the current selection.
     */
    public void setSelectedServer(ServerInfo server) {
        if (server != null) {
            ServerGuid guid = server.getGuid();
            for (int n = 0, nmax = comboBox.getItemCount(); n < nmax; ++n) {
                Object item = comboBox.getItemAt(n);
                if (isMatchingServerItem(item, guid)) {
                    comboBox.setSelectedItem(item);
                    return;
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.common.server.ServerGuid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.