com.microsoft.tfs.core.clients.webservices
Class TeamFoundationIdentity

java.lang.Object
  extended by com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
      extended by com.microsoft.tfs.core.clients.webservices.TeamFoundationIdentity

public class TeamFoundationIdentity
extends com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper

Wrapper class for the _TeamFoundationIdentity proxy object. See IdentityAttributeTags for property names for use with getAttribute(String, String) and setAttribute(String, String).

See Also:
IdentityAttributeTags
Since:
TEE-SDK-10.1
Thread-safety:
thread-safe

Field Summary
 
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
webServiceObject
 
Constructor Summary
TeamFoundationIdentity(ms.ws._TeamFoundationIdentity webServiceObject)
          Wrapper constructor
TeamFoundationIdentity(IdentityDescriptor descriptor, java.lang.String displayName, boolean isActive, IdentityDescriptor[] members, IdentityDescriptor[] memberOf)
           
 
Method Summary
 java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
          Deprecated. use getProperty(String)
 IdentityDescriptor getDescriptor()
           
 java.lang.String getDisplayName()
           
 IdentityDescriptor[] getMemberOf()
           
 IdentityDescriptor[] getMembers()
           
 java.util.Set<java.lang.String> getModifiedPropertiesLog(IdentityPropertyScope propertyScope)
          Modified properties, to be processed on update.
 java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.Object>> getProperties()
          Property bag.
 java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.Object>> getProperties(IdentityPropertyScope propertyScope)
          Property bag.
 java.lang.Object getProperty(IdentityPropertyScope propertyScope, java.lang.String name)
          Property accessor.
 java.lang.Object getProperty(java.lang.String name)
          Property accessor.
 com.microsoft.tfs.util.GUID getTeamFoundationID()
           
 java.lang.String getUniqueName()
          A human-readable string that can be used to reference the identity.
 int getUniqueUserID()
           
 ms.ws._TeamFoundationIdentity getWebServiceObject()
          Returns the wrapped proxy object.
 boolean isActive()
           
 boolean isContainer()
           
 void removeProperty(IdentityPropertyScope propertyScope, java.lang.String name)
          Remove property, if it exists.
 void removeProperty(java.lang.String name)
          Remove property, if it exists.
 void resetModifiedProperties()
           
 void setAttribute(java.lang.String name, java.lang.String value)
          Deprecated. use setProperty(String, Object)
 void setDisplayName(java.lang.String displayName)
           
 void setProperty(IdentityPropertyScope propertyScope, java.lang.String name, java.lang.Object value)
          Sets a property, will overwrite if already set.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a property, will overwrite if already set.
 boolean tryGetProperty(IdentityPropertyScope propertyScope, java.lang.String name, java.util.concurrent.atomic.AtomicReference<java.lang.Object> value)
          Property accessor.
 boolean tryGetProperty(java.lang.String name, java.util.concurrent.atomic.AtomicReference<java.lang.Object> value)
          Property accessor.
 
Methods inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TeamFoundationIdentity

public TeamFoundationIdentity(IdentityDescriptor descriptor,
                              java.lang.String displayName,
                              boolean isActive,
                              IdentityDescriptor[] members,
                              IdentityDescriptor[] memberOf)

TeamFoundationIdentity

public TeamFoundationIdentity(ms.ws._TeamFoundationIdentity webServiceObject)
Wrapper constructor

Method Detail

getWebServiceObject

public ms.ws._TeamFoundationIdentity getWebServiceObject()
Returns the wrapped proxy object.


tryGetProperty

public boolean tryGetProperty(java.lang.String name,
                              java.util.concurrent.atomic.AtomicReference<java.lang.Object> value)
Property accessor. Will return null if not found.


tryGetProperty

public boolean tryGetProperty(IdentityPropertyScope propertyScope,
                              java.lang.String name,
                              java.util.concurrent.atomic.AtomicReference<java.lang.Object> value)
Property accessor. Will return null if not found.


getProperty

public java.lang.Object getProperty(java.lang.String name)
Property accessor. Will throw if not found.


getProperty

public java.lang.Object getProperty(IdentityPropertyScope propertyScope,
                                    java.lang.String name)
Property accessor. Will throw if not found.


getProperties

public java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.Object>> getProperties()
Property bag. This could be useful, for example if consumer has to iterate through current properties and modify / remove some based on pattern matching property names.

This method differs from the Visual Studio implementation in that it returns a read-only collection.


getProperties

public java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.Object>> getProperties(IdentityPropertyScope propertyScope)
Property bag. This could be useful, for example if consumer has to iterate through current properties and modify / remove some based on pattern matching property names.

This method differs from the Visual Studio implementation in that it returns a read-only collection.


setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Sets a property, will overwrite if already set.

Parameters:
name - the name of the property
value - the value of the property

setProperty

public void setProperty(IdentityPropertyScope propertyScope,
                        java.lang.String name,
                        java.lang.Object value)
Sets a property, will overwrite if already set.

Parameters:
name - the name of the property
value - the value of the property
propertyScope - indiciates if local or global property is set

removeProperty

public void removeProperty(java.lang.String name)
Remove property, if it exists.

Parameters:
propertyName - the name of the property

removeProperty

public void removeProperty(IdentityPropertyScope propertyScope,
                           java.lang.String name)
Remove property, if it exists.

Parameters:
propertyName - the name of the property

getAttribute

@Deprecated
public java.lang.String getAttribute(java.lang.String name,
                                                java.lang.String defaultValue)
Deprecated. use getProperty(String)


setAttribute

@Deprecated
public void setAttribute(java.lang.String name,
                                    java.lang.String value)
Deprecated. use setProperty(String, Object)


isContainer

public boolean isContainer()

getModifiedPropertiesLog

public java.util.Set<java.lang.String> getModifiedPropertiesLog(IdentityPropertyScope propertyScope)
Modified properties, to be processed on update.


resetModifiedProperties

public void resetModifiedProperties()

isActive

public boolean isActive()

getTeamFoundationID

public com.microsoft.tfs.util.GUID getTeamFoundationID()

getDisplayName

public java.lang.String getDisplayName()

setDisplayName

public void setDisplayName(java.lang.String displayName)

getUniqueName

public java.lang.String getUniqueName()
A human-readable string that can be used to reference the identity. Intended to be easy to read and type. Can be used in conjunction with the general search factor in leiu of a display name.

Examples are CONTOSO\jsmith and jsmith@contoso.com.


getUniqueUserID

public int getUniqueUserID()

getDescriptor

public IdentityDescriptor getDescriptor()

getMembers

public IdentityDescriptor[] getMembers()

getMemberOf

public IdentityDescriptor[] getMemberOf()


© 2015 Microsoft. All rights reserved.