/** * Deletes a configured MultiUserChatService by subdomain, and shuts it down. * * @param subdomain The subdomain of the service to be deleted. * @throws NotFoundException if the service was not found. */ public void removeMultiUserChatService(String subdomain) throws NotFoundException { Long serviceID = getMultiUserChatServiceID(subdomain); if (serviceID == null) { Log.error("MultiUserChatManager: Unable to find service to remove for "+subdomain); throw new NotFoundException(); } removeMultiUserChatService(serviceID); }
public MUCServiceProperties(String subdomain) { this.subdomain = subdomain; if (properties == null) { properties = new ConcurrentHashMap<>(); } else { properties.clear(); } serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(subdomain); if (serviceID == null) { Log.debug("MUCServiceProperties: Unable to find service ID for subdomain "+subdomain); } else { loadProperties(); } }
/** * Updates the configuration of a MUC service. This is more involved than it may seem. If the * subdomain is changed, we need to shut down the old service and start up the new one, registering * the new subdomain and cleaning up the old one. Properties are tied to the ID, which will not change. * * @param cursubdomain The current subdomain assigned to the service. * @param newsubdomain New subdomain to assign to the service. * @param description New description to assign to the service. * @throws NotFoundException if service was not found. */ public void updateMultiUserChatService(String cursubdomain, String newsubdomain, String description) throws NotFoundException { Long serviceID = getMultiUserChatServiceID(cursubdomain); if (serviceID == null) throw new NotFoundException(); updateMultiUserChatService(serviceID, newsubdomain, description); }
/** * Creates a new MUC service and registers it with the manager, and starts up the service. * * @param subdomain Subdomain of the MUC service. * @param description Description of the MUC service (can be null for default description) * @param isHidden True if the service is hidden from view in services lists. * @return MultiUserChatService implementation that was just created. * @throws AlreadyExistsException if the service already exists. */ public MultiUserChatServiceImpl createMultiUserChatService(String subdomain, String description, Boolean isHidden) throws AlreadyExistsException { if (getMultiUserChatServiceID(subdomain) != null) throw new AlreadyExistsException(); MultiUserChatServiceImpl muc = new MultiUserChatServiceImpl(subdomain, description, isHidden); insertService(subdomain, description, isHidden); registerMultiUserChatService(muc); return muc; }
Long serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(chatserver.getServiceName());
pstmt.setLong(1, XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(room.getMUCService().getServiceName())); pstmt.setLong(2, room.getID()); pstmt.setString(3, StringUtils.dateToMillis(room.getCreationDate()));
ResultSet rs = null; try { Long serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(room.getMUCService().getServiceName()); con = DbConnectionManager.getConnection(); pstmt = con.prepareStatement(LOAD_ROOM);
/** * Deletes a configured MultiUserChatService by subdomain, and shuts it down. * * @param subdomain The subdomain of the service to be deleted. * @throws NotFoundException if the service was not found. */ public void removeMultiUserChatService(String subdomain) throws NotFoundException { Long serviceID = getMultiUserChatServiceID(subdomain); if (serviceID == null) { Log.error("MultiUserChatManager: Unable to find service to remove for "+subdomain); throw new NotFoundException(); } removeMultiUserChatService(serviceID); }
public MUCServiceProperties(String subdomain) { this.subdomain = subdomain; if (properties == null) { properties = new ConcurrentHashMap<>(); } else { properties.clear(); } serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(subdomain); if (serviceID == null) { Log.debug("MUCServiceProperties: Unable to find service ID for subdomain "+subdomain); } else { loadProperties(); } }
/** * Updates the configuration of a MUC service. This is more involved than it may seem. If the * subdomain is changed, we need to shut down the old service and start up the new one, registering * the new subdomain and cleaning up the old one. Properties are tied to the ID, which will not change. * * @param cursubdomain The current subdomain assigned to the service. * @param newsubdomain New subdomain to assign to the service. * @param description New description to assign to the service. * @throws NotFoundException if service was not found. */ public void updateMultiUserChatService(String cursubdomain, String newsubdomain, String description) throws NotFoundException { Long serviceID = getMultiUserChatServiceID(cursubdomain); if (serviceID == null) throw new NotFoundException(); updateMultiUserChatService(serviceID, newsubdomain, description); }
/** * Creates a new MUC service and registers it with the manager, and starts up the service. * * @param subdomain Subdomain of the MUC service. * @param description Description of the MUC service (can be null for default description) * @param isHidden True if the service is hidden from view in services lists. * @return MultiUserChatService implementation that was just created. * @throws AlreadyExistsException if the service already exists. */ public MultiUserChatServiceImpl createMultiUserChatService(String subdomain, String description, Boolean isHidden) throws AlreadyExistsException { if (getMultiUserChatServiceID(subdomain) != null) throw new AlreadyExistsException(); MultiUserChatServiceImpl muc = new MultiUserChatServiceImpl(subdomain, description, isHidden); insertService(subdomain, description, isHidden); registerMultiUserChatService(muc); return muc; }
Long serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(chatserver.getServiceName());
pstmt.setLong(1, XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(room.getMUCService().getServiceName())); pstmt.setLong(2, room.getID()); pstmt.setString(3, StringUtils.dateToMillis(room.getCreationDate()));
ResultSet rs = null; try { Long serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(room.getMUCService().getServiceName()); con = DbConnectionManager.getConnection(); pstmt = con.prepareStatement(LOAD_ROOM);