/** * Returns <code>true</code> if the synchonization is enabled.<p> * * The synchonization is enabled if both source and destination * path is set, and also the enabled flag is true.<p> * * @return <code>true</code> if the synchonization is enabled */ public boolean isSyncEnabled() { return isEnabled() && (m_sourceListInVfs != null) && (m_destinationPathInRfs != null); }
/** * Sets the source path list of the synchronization in the OpenCms VFS.<p> * * The objects in the list must be of type <code>{@link String}</code>. * * @param sourceListInVfs the source path list of the synchronization in the OpenCms VFS to set */ public void setSourceListInVfs(List<String> sourceListInVfs) { if (sourceListInVfs == null) { m_sourceListInVfs = new ArrayList<String>(); } else { m_sourceListInVfs = optimizeSourceList(sourceListInVfs); } }
(String)m_user.getAdditionalInfo(PREFERENCES + SYNC_SETTINGS + SYNC_VFS_LIST), '|'); m_synchronizeSettings = new CmsSynchronizeSettings(); m_synchronizeSettings.setEnabled(enabled); m_synchronizeSettings.setDestinationPathInRfs(destination); m_synchronizeSettings.setSourceListInVfs(vfsList); } catch (Throwable t) {
if ((settings != null) && (settings.isSyncEnabled())) { m_destinationPathInRfs = settings.getDestinationPathInRfs(); m_newSyncList = new HashMap<String, CmsSynchronizeList>(); Iterator<String> i = settings.getSourceListInVfs().iterator(); while (i.hasNext()) { i = settings.getSourceListInVfs().iterator();
m_user.setAdditionalInfo( PREFERENCES + SYNC_SETTINGS + SYNC_ENABLED, Boolean.valueOf(getSynchronizeSettings().isEnabled())); m_user.setAdditionalInfo( PREFERENCES + SYNC_SETTINGS + SYNC_DESTINATION, getSynchronizeSettings().getDestinationPathInRfs()); m_user.setAdditionalInfo( PREFERENCES + SYNC_SETTINGS + SYNC_VFS_LIST, CmsStringUtil.collectionAsString(getSynchronizeSettings().getSourceListInVfs(), "|")); } else { m_user.deleteAdditionalInfo(PREFERENCES + SYNC_SETTINGS + SYNC_ENABLED);
/** * Returns true if the user has enabled synchronization.<p> * * @return true if the user has enabled synchronization */ public boolean isSyncEnabled() { CmsSynchronizeSettings syncSettings = getSettings().getUserSettings().getSynchronizeSettings(); return (syncSettings != null) && syncSettings.isSyncEnabled(); }
/** * Initializes the synchronize settings object for this dialog.<p> */ protected void initSynchronizeSettingsObject() { Object o = getDialogObject(); if ((o == null) || !(o instanceof CmsSynchronizeSettings)) { CmsUserSettings userSettings = new CmsUserSettings(getCms()); o = userSettings.getSynchronizeSettings(); } if (o != null) { m_synchronizeSettings = (CmsSynchronizeSettings)o; } else { m_synchronizeSettings = new CmsSynchronizeSettings(); } }
+ SYNC_SETTINGS + SYNC_VFS_LIST), '|'); m_synchronizeSettings = new CmsSynchronizeSettings(); m_synchronizeSettings.setEnabled(enabled); m_synchronizeSettings.setDestinationPathInRfs(destination); m_synchronizeSettings.setSourceListInVfs(vfsList); } catch (Throwable t) {
if ((settings != null) && (settings.isSyncEnabled())) { m_destinationPathInRfs = settings.getDestinationPathInRfs(); m_newSyncList = new HashMap(); Iterator i = settings.getSourceListInVfs().iterator(); while (i.hasNext()) { i = settings.getSourceListInVfs().iterator();
m_user.setAdditionalInfo( PREFERENCES + SYNC_SETTINGS + SYNC_ENABLED, Boolean.valueOf(getSynchronizeSettings().isEnabled())); m_user.setAdditionalInfo( PREFERENCES + SYNC_SETTINGS + SYNC_DESTINATION, getSynchronizeSettings().getDestinationPathInRfs()); m_user.setAdditionalInfo(PREFERENCES + SYNC_SETTINGS + SYNC_VFS_LIST, CmsStringUtil.collectionAsString( getSynchronizeSettings().getSourceListInVfs(), "|")); } else {
/** * Returns true if the user has enabled synchronization.<p> * * @return true if the user has enabled synchronization */ public boolean isSyncEnabled() { CmsSynchronizeSettings syncSettings = getSettings().getUserSettings().getSynchronizeSettings(); return (syncSettings != null) && syncSettings.isSyncEnabled(); }
/** * @see org.opencms.workplace.tools.I_CmsToolHandler#isEnabled(org.opencms.file.CmsObject) */ public boolean isEnabled(CmsObject cms) { if (getPath().startsWith("/workplace/broadcast") || getPath().equals("/workplace")) { if (OpenCms.getRoleManager().hasRole(cms, CmsRole.ACCOUNT_MANAGER)) { return true; } } if (getPath().startsWith("/workplace/synchronize_action")) { CmsUserSettings settings = new CmsUserSettings(cms); CmsSynchronizeSettings syncSettings = settings.getSynchronizeSettings(); return (syncSettings != null) && syncSettings.isSyncEnabled(); } return OpenCms.getRoleManager().hasRole(cms, CmsRole.WORKPLACE_MANAGER); }
/** * Returns <code>true</code> if the synchonization is enabled.<p> * * The synchonization is enabled if both source and destination * path is set, and also the enabled flag is true.<p> * * @return <code>true</code> if the synchonization is enabled */ public boolean isSyncEnabled() { return isEnabled() && (m_sourceListInVfs != null) && (m_destinationPathInRfs != null); }
/** * Sets the source path list of the synchronization in the OpenCms VFS.<p> * * The objects in the list must be of type <code>{@link String}</code>. * * @param sourceListInVfs the source path list of the synchronization in the OpenCms VFS to set */ public void setSourceListInVfs(List sourceListInVfs) { if (sourceListInVfs == null) { m_sourceListInVfs = new ArrayList(); } else { m_sourceListInVfs = optimizeSourceList(sourceListInVfs); } }