diff options
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/UserAccount.java')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/UserAccount.java | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/UserAccount.java b/target_explorer/plugins/org.eclipse.tcf.te.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/UserAccount.java new file mode 100644 index 000000000..d501473e8 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/UserAccount.java @@ -0,0 +1,95 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * This program and the accompanying materials are made available under the terms + * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wind River Systems - initial API and implementation + * William Chen (Wind River) - [352302]Opening a file in an editor depending on + * the client's permissions. + *******************************************************************************/ +package org.eclipse.tcf.te.tcf.filesystem.core.model; + +/** + * The data model of a user account. + */ +public class UserAccount { + // The user's id. + private int uid; + // The user's group id. + private int gid; + // The user's effective id. + private int euid; + // The user's effective group id. + private int egid; + // The user's home directory. + private String home; + + /** + * Create a user account with given data. + * + * @param uid + * The user's id + * @param gid + * The user's group id + * @param euid + * The user's effective id. + * @param egid + * The user's effective group id. + * @param home + * The user's home directory. + */ + public UserAccount(int uid, int gid, int euid, int egid, String home) { + this.uid = uid; + this.gid = gid; + this.euid = euid; + this.egid = egid; + this.home = home; + } + + /** + * Get the user's id. + * + * @return The user's id. + */ + public int getUID() { + return uid; + } + + /** + * Get the user's group id. + * + * @return The user's group id. + */ + public int getGID() { + return gid; + } + + /** + * Get the user's effective id. + * + * @return The user's effective id. + */ + public int getEUID() { + return euid; + } + + /** + * Get the user's effective group id. + * + * @return The user's effective group id. + */ + public int getEGID() { + return egid; + } + + /** + * Get the user's home directory. + * + * @return The user's home directory. + */ + public String getHome() { + return home; + } +} |