Search in sources :

Example 61 with User

use of com.google.api.ads.admanager.axis.v202111.User in project openstack4j by ContainX.

the class KeystoneUserServiceTests method getUser_byName_byDomainId_Test.

/**
 * returns the user specified by name and domain.
 *
 * @throws Exception
 */
public void getUser_byName_byDomainId_Test() throws Exception {
    respondWith(JSON_USER_GET_BYNAME_BYDOMAINID);
    User user = osv3().identity().users().getByName(USER_NAME, USER_DOMAIN_ID);
    assertEquals(user.getName(), USER_NAME);
    assertEquals(user.getId(), USER_ID);
    assertEquals(user.getDomainId(), USER_DOMAIN_ID);
}
Also used : KeystoneUser(org.openstack4j.openstack.identity.v3.domain.KeystoneUser) User(org.openstack4j.model.identity.v3.User)

Example 62 with User

use of com.google.api.ads.admanager.axis.v202111.User in project Douya by DreaminginCodeZH.

the class UserResource method get.

@Override
public User get() {
    User user = super.get();
    if (user == null) {
        // Can be called before onCreate() is called.
        ensureArguments();
        user = mExtraUser;
    }
    return user;
}
Also used : User(me.zhanghai.android.douya.network.api.info.apiv2.User) SimpleUser(me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser)

Example 63 with User

use of com.google.api.ads.admanager.axis.v202111.User in project Douya by DreaminginCodeZH.

the class NavigationHeaderLayout method bindActiveUser.

private void bindActiveUser() {
    mActiveAccount = AccountUtils.getActiveAccount();
    User user = mAdapter.getUser(mActiveAccount);
    if (user != null) {
        bindAvatarImage(mAvatarImage, user.getLargeAvatarOrAvatar());
        mNameText.setText(user.name);
        if (!TextUtils.isEmpty(user.signature)) {
            mDescriptionText.setText(user.signature);
        } else {
            // noinspection deprecation
            mDescriptionText.setText(user.uid);
        }
    } else {
        SimpleUser partialUser = mAdapter.getPartialUser(mActiveAccount);
        bindAvatarImage(mAvatarImage, null);
        mNameText.setText(partialUser.name);
        // noinspection deprecation
        mDescriptionText.setText(partialUser.uid);
    }
    mAvatarImage.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View view) {
            if (mAccountTransitionRunning) {
                return;
            }
            if (mListener != null) {
                mListener.openProfile(mActiveAccount);
            }
        }
    });
    mAvatarImage.setOnLongClickListener(new OnLongClickListener() {

        @Override
        public boolean onLongClick(View view) {
            if (mAccountTransitionRunning) {
                return false;
            }
            if (mListener != null) {
                mListener.openProfile(mActiveAccount);
            }
            return true;
        }
    });
// mBackdropImage.setImageResource();
}
Also used : User(me.zhanghai.android.douya.network.api.info.apiv2.User) SimpleUser(me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser) SimpleUser(me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser) ImageView(android.widget.ImageView) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView)

Example 64 with User

use of com.google.api.ads.admanager.axis.v202111.User in project Douya by DreaminginCodeZH.

the class NavigationHeaderLayout method bindRecentUser.

private void bindRecentUser(ImageView avatarImage, final Account account) {
    if (account == null) {
        avatarImage.setVisibility(GONE);
        return;
    }
    avatarImage.setVisibility(VISIBLE);
    User user = mAdapter.getUser(account);
    if (user != null) {
        bindAvatarImage(avatarImage, user.getLargeAvatarOrAvatar());
    } else {
        bindAvatarImage(avatarImage, null);
    }
    avatarImage.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View view) {
            switchToAccountWithTransitionIfNotRunning(account);
        }
    });
    avatarImage.setOnLongClickListener(new OnLongClickListener() {

        @Override
        public boolean onLongClick(View view) {
            if (mAccountTransitionRunning) {
                return false;
            }
            if (mListener != null) {
                mListener.openProfile(account);
            }
            return true;
        }
    });
}
Also used : User(me.zhanghai.android.douya.network.api.info.apiv2.User) SimpleUser(me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser) ImageView(android.widget.ImageView) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView)

Example 65 with User

use of com.google.api.ads.admanager.axis.v202111.User in project Village_Defense by Plajer.

the class ArenaUtils method bringDeathPlayersBack.

public static void bringDeathPlayersBack(Arena arena) {
    for (Player player : arena.getPlayers()) {
        if (!arena.getPlayersLeft().contains(player)) {
            User user = UserManager.getUser(player.getUniqueId());
            user.setFakeDead(false);
            user.setSpectator(false);
            arena.teleportToStartLocation(player);
            player.setFlying(false);
            player.setAllowFlight(false);
            player.setGameMode(GameMode.SURVIVAL);
            arena.showPlayers();
            player.getInventory().clear();
            user.getKit().giveKitItems(player);
            player.sendMessage(ChatManager.colorMessage("In-Game.Back-In-Game"));
        }
    }
}
Also used : Player(org.bukkit.entity.Player) User(pl.plajer.villagedefense3.User)

Aggregations

User (pl.plajer.villagedefense3.User)30 Player (org.bukkit.entity.Player)18 User (org.gluu.oxtrust.model.scim2.User)17 EventHandler (org.bukkit.event.EventHandler)11 GluuCustomPerson (org.gluu.oxtrust.model.GluuCustomPerson)10 ScimPatchUser (org.gluu.oxtrust.model.scim2.ScimPatchUser)10 User (org.openstack4j.model.identity.v3.User)10 StatementBuilder (com.google.api.ads.admanager.axis.utils.v202111.StatementBuilder)8 DuplicateEntryException (org.gluu.site.ldap.exception.DuplicateEntryException)8 Arena (pl.plajer.villagedefense3.arena.Arena)8 ArrayList (java.util.ArrayList)7 User (me.zhanghai.android.douya.network.api.info.apiv2.User)7 EntryPersistenceException (org.gluu.site.ldap.persistence.exception.EntryPersistenceException)7 User (com.google.api.ads.admanager.axis.v202108.User)6 UserServiceInterface (com.google.api.ads.admanager.axis.v202108.UserServiceInterface)6 User (com.google.api.ads.admanager.axis.v202202.User)6 UserServiceInterface (com.google.api.ads.admanager.axis.v202202.UserServiceInterface)6 Date (java.util.Date)6 SimpleUser (me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser)6 UserTeamAssociation (com.google.api.ads.admanager.axis.v202111.UserTeamAssociation)5