@Override public Project doInTransaction(TransactionStatus status) { //Create an account associated with the project StringBuilder acctNm = new StringBuilder("PrjAcct-"); acctNm.append(name).append("-").append(ownerFinal.getDomainId()); Account projectAccount = _accountMgr.createAccount(acctNm.toString(), Account.ACCOUNT_TYPE_PROJECT, null, domainId, null, null, UUID.randomUUID().toString()); Project project = _projectDao.persist(new ProjectVO(name, displayText, ownerFinal.getDomainId(), projectAccount.getId())); //assign owner to the project assignAccountToProject(project, ownerFinal.getId(), ProjectAccount.Role.Admin); if (project != null) { CallContext.current().setEventDetails("Project id=" + project.getId()); CallContext.current().putContextParameter(Project.class, project.getUuid()); } //Increment resource count _resourceLimitMgr.incrementResourceCount(ownerFinal.getId(), ResourceType.project); return project; } });
AccountManager accountManager = connection.getAccountManager(); Map<String, String> attributes = new HashMap<String, String>(); attributes.put("Username", username); attributes.put("Name", name); attributes.put("Email", email_id); attributes.put("Password", password); attributes.put("Confirm Password", cmpassword); accountManager.createAccount("45.56.87.223","5222",attributes);
AccountManager am = new AccountManager(mXMPPConnection); Log.i("Registration Details:", "UaerName = " + mConfig.userName + " Password is ==" + mConfig.password); Map<String, String> mp = new HashMap<String, String>(); // adding or set elements in Map by put method key and value // pair mp.put("username", mConfig.userName); mp.put("password", mConfig.password); mp.put("name", mConfig.userName); mp.put("email", ""); // am.createAccount(mConfig.userName, mConfig.password); am.createAccount(mConfig.userName, mConfig.password, mp);
xmpptcpConnection.connect(); if (anonymous) { AccountManager accountManager = AccountManager.getInstance(xmpptcpConnection); accountManager.sensitiveOperationOverInsecureConnection(true); accountManager.createAccount(username, password) } xmpptcpConnection.login(); //with old or newly created username, password from shared preferences
AccountManager accountManager=new AccountManager(connection); try { accountManager.createAccount("username", "password"); } catch (XMPPException e1) { Log.d(e1.getMessage(), e1); }
public void registerUser() { AccountManager manager = connection.getAccountManager(); try { manager.createAccount("Romain Guy","halejag");//username & paswd } catch (XMPPException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
AccountManager accountManager=AccountManager.getInstance(connection); try { accountManager.createAccount("username", "password"); } catch (XMPPException e1) { Log.d(e1.getMessage(), e1); }
XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder() .setServiceName(SERVICE_NAME) .setHost(HOST_NAME) .setPort(5222) .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) .build(); AbstractXMPPConnection connection = new XMPPTCPConnection(conf); connection.connect(); // Here we create the connection // Now we create the account: AccountManager accountManager = AccountManager.getInstance(connection); accountManager.createAccount(username, password); // The account has been created, so we can now login connection.login(username, password);
AccountManager accountManager = AccountManager.getInstance(connection); try { if (accountManager.supportsAccountCreation()) { accountManager.sensitiveOperationOverInsecureConnection(true); accountManager.createAccount("userName", "password"); } } catch (SmackException.NoResponseException e) { e.printStackTrace(); } catch (XMPPException.XMPPErrorException e) { e.printStackTrace(); } catch (SmackException.NotConnectedException e) { e.printStackTrace(); }
objAccountManager.createAccount(strUsername, strPassword); objXmpptcpConnection = loginToServer(objXmpptcpConnection, strUsername, strPassword); } catch (SmackException | XMPPException e) {
// Creating a connection XMPPTCPConnectionConfiguration connConfig = XMPPTCPConnectionConfiguration.builder() .setHost("myHost.com") // Name of your Host .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) .setPort(5222) // Your Port for accepting c2s connection .setDebuggerEnabled(true) .setServiceName("myServiceName") .build(); AbstractXMPPConnection connection = new XMPPTCPConnection(connConfig); try { // connecting... connection.connect(); Log.i("TAG", "Connected to " + connection.getHost()); // Registering the user AccountManager accountManager = AccountManager.getInstance(connection); accountManager.sensitiveOperationOverInsecureConnection(true); accountManager.createAccount(username, password); // Skipping optional fields like email, first name, last name, etc.. } catch (SmackException | IOException | XMPPException e) { Log.e("TAG", e.getMessage()); xmppClient.setConnection(null); }
ConnectionConfiguration connConfig = new ConnectionConfiguration("ip", 5222); XMPPConnection connection = new XMPPConnection(connConfig); connection.connect(); connection.login("username", "password"); AccountManager accountManager = connection.getAccountManager(); accountManager.createAccount("adminCreated1", "123456"); connection.disconnect();
Map<String, String> attributes = new HashMap<String, String>(); attributes.put("Name", "ABC"); createUserAccount.createAccount("asdf", "Password", attributes); Log.e("", "created");
m_connection = new XMPPConnection(config); m_connection.connect(); newAccount.createAccount("Rahul", "android"); presence = new Presence(Presence.Type.available); m_connection.sendPacket(presence); }}
public static void main(String[] args) { XMPPConnection.DEBUG_ENABLED = true; XMPPConnection connection=null; try { ConnectionConfiguration config = new ConnectionConfiguration("localhost", 5222); connection = new XMPPConnection(config); connection.connect(); AccountManager accountManager = connection.getAccountManager(); if(accountManager.supportsAccountCreation()) { accountManager.createAccount("user1", "user1pw"); } else { ... } } catch (Exception e) { ... } connection.disconnect(); }
Log.i("service", mConnection.getServiceName()); AccountManager accountManager = AccountManager.getInstance(mConnection); accountManager.createAccount(username, newpassword); status = true; } catch (SmackException.NoResponseException e) {