|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sonymobile.jenkins.plugins.teamview.UserUtil
public final class UserUtil
Utility methods for reading users. Most utility methods in User are private, so there are copies
of those here. Let's keep our fingers crossed that they don't change too much in core down the road.
| Method Summary | |
|---|---|
static void |
checkViewsReadPermission(String idOrFullName)
Checks that the current user has access to the provided user's views. |
static hudson.XmlFile |
getConfigFile(String idOrFullName)
The user configuration file. |
protected static File |
getConfigFileFor(String idOrFullName)
The config file for the user. |
protected static File |
getRootDir()
Gets the directory where Hudson stores user information. |
protected static String |
toStorageId(String idOrFullName)
Performs a bunch of string replacing to get to what the user id directory would be named. |
static List<hudson.model.View> |
unmarshalViews(String idOrFullName)
Reads the user from disk and returns the MyViewsProperty inside. |
static boolean |
userExists(String idOrFullName)
Checks if there is a config.xml file for the provided user id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static List<hudson.model.View> unmarshalViews(String idOrFullName)
throws IOException,
ParserConfigurationException,
SAXException,
TransformerException
MyViewsProperty inside.
idOrFullName - the user id.
IOException - if so.
TransformerException - if something goes wrong in the XML to String transformation.
SAXException - if something goes wrong in the initial parsing of the config file.
ParserConfigurationException - if a DocumentBuilder cannot be created.public static boolean userExists(String idOrFullName)
idOrFullName - the user name
protected static File getRootDir()
public static hudson.XmlFile getConfigFile(String idOrFullName)
idOrFullName - the user id
protected static File getConfigFileFor(String idOrFullName)
idOrFullName - the user id
protected static String toStorageId(String idOrFullName)
User.get(String, boolean)
idOrFullName - the user id
public static void checkViewsReadPermission(String idOrFullName)
idOrFullName - id of the user to get the views from.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||