C# Class Org.IdentityConnectors.Framework.Common.Objects.ConnectorAttributeUtil

Mostra file Open project: Tirasa/ConnId

Public Methods

Method Description
AddUid ( ICollection attrs, Uid uid ) : ICollection

Returns a mutable copy of the original set with the uid attribute added.

CreateSpecialName ( string name ) : string

Creates the special naming for operational type attributes.

FilterUid ( ICollection attrs ) : ICollection

Returns a mutable copy of the original set with the uid attribute removed.

Find ( string name, ICollection attrs ) : ConnectorAttribute

Find the ConnectorAttribute of the given name in the Set.

GetAsStringValue ( ConnectorAttribute attr ) : string

Gets the string value from the single value attribute.

GetBasicAttributes ( ICollection attrs ) : ICollection

Filters out all special attributes from the set.

These special attributes include Password, Uid etc..

GetBigDecimalValue ( ConnectorAttribute attr ) : BigDecimal

Gets the big decimal value from the single value attribute.

Since 1.4

GetBigIntegerValue ( ConnectorAttribute attr ) : BigInteger

Gets the big integer value from the single value attribute.

Since 1.4

GetBooleanValue ( ConnectorAttribute attr ) : bool?

Gets the boolean value from the single value attribute.

GetByteArrayValue ( ConnectorAttribute attr ) : byte[]

Gets the byte value from the single value attribute.

Since 1.4

GetByteValue ( ConnectorAttribute attr ) : byte?

Gets the byte value from the single value attribute.

Since 1.4

GetCharacterValue ( ConnectorAttribute attr ) : char?

Gets the character value from the single value attribute.

Since 1.4

GetCurrentPasswordValue ( ICollection attrs ) : GuardedString

Get the current password value from the provided set of ConnectorAttributes.

GetDateTimeValue ( ConnectorAttribute attr ) : DateTime?

Gets the date value from the single value attribute.

GetDictionaryValue ( ConnectorAttribute attr ) : object>.IDictionary

Gets the dictionary value from the single value attribute.

Since 1.4

GetDoubleValue ( ConnectorAttribute attr ) : double?

Gets the double value from the single value attribute.

GetEnableDate ( ICollection attrs ) : DateTime?

Get the enable date from the set of attributes.

GetFloatValue ( ConnectorAttribute attr ) : float?

Gets the float value from the single value attribute.

Since 1.4

GetGuardedByteArrayValue ( ConnectorAttribute attr ) : GuardedByteArray

Gets the guarded byte array value from the single value attribute.

Since 1.4

GetGuardedStringValue ( ConnectorAttribute attr ) : GuardedString

Gets the guarded string value from the single value attribute.

GetIntegerValue ( ConnectorAttribute attr ) : int?

Gets the integer value from the single value attribute.

GetLongValue ( ConnectorAttribute attr ) : long?

Gets the long value from the single value attribute.

GetNameFromAttributes ( ICollection attrs ) : Name

Gets the 'Name' attribute from a set of ConnectorAttributes.

GetPasswordExpirationDate ( ConnectorObject obj ) : DateTime?

Retrieve the password expiration date from the ConnectorObject.

GetPasswordExpired ( ICollection attrs ) : bool?

Get the password expired attribute from a Collection of ConnectorAttributes.

GetPasswordValue ( ICollection attrs ) : GuardedString

Get the password value from the provided set of ConnectorAttributes.

GetSingleValue ( ConnectorAttribute attr ) : object

Get the single value from the ConnectorAttribute.

Return null if the attribute's list of values is null or empty.

GetSpecialAttributes ( ICollection attrs ) : ICollection

Filter out any basic attributes from the specified set, leaving only special attributes.

Special attributes include Name, Uid, and OperationalAttributes.

GetStringValue ( ConnectorAttribute attr ) : string

Gets the string value from the single value attribute.

GetUidAttribute ( ICollection attrs ) : Uid

Get the Uid from the attribute set.

IsEnabled ( ConnectorObject obj ) : bool?

Determine if the ConnectorObject is enable.

By getting the value of the OperationalAttributes.ENABLE_NAME.

IsLockedOut ( ConnectorObject obj ) : bool?

Determine if the ConnectorObject is locked out.

By getting the value of the OperationalAttributes.LOCK_OUT_NAME.

IsPasswordExpired ( ConnectorObject obj ) : bool?

Determine if the password is expired for this object.

IsSpecial ( ConnectorAttribute attr ) : bool

Determines if this attribute is a special attribute.

IsSpecial ( ConnectorAttributeInfo attr ) : bool

Determines if this attribute is a special attribute.

IsSpecialName ( String name ) : bool

Determines whether the specified attribute name is special in the sense of ConnectorAttributeUtil.CreateSpecialName.

NamesEqual ( string name1, string name2 ) : bool

Compares two attribute names for equality.

ToMap ( ICollection attributes ) : ConnectorAttribute>.IDictionary

Transform a Collection of ConnectorAttribute} instances into a {@link Map}. The key to each element in the map is the name of an ConnectorAttribute. The value of each element in the map is the ConnectorAttribute instance with that name.

Method Details

AddUid() public static method

Returns a mutable copy of the original set with the uid attribute added.
public static AddUid ( ICollection attrs, Uid uid ) : ICollection
attrs ICollection The original set. Must not be null.
uid Uid The uid. Must not be null.
return ICollection

CreateSpecialName() public static method

Creates the special naming for operational type attributes.
public static CreateSpecialName ( string name ) : string
name string string to make special
return string

FilterUid() public static method

Returns a mutable copy of the original set with the uid attribute removed.
public static FilterUid ( ICollection attrs ) : ICollection
attrs ICollection The original set. Must not be null.
return ICollection

Find() public static method

Find the ConnectorAttribute of the given name in the Set.
public static Find ( string name, ICollection attrs ) : ConnectorAttribute
name string /// 's name to search for.
attrs ICollection /// of attribute to search.
return ConnectorAttribute

GetAsStringValue() public static method

Gets the string value from the single value attribute.
if the attribute is a multi valued instead of single valued.
public static GetAsStringValue ( ConnectorAttribute attr ) : string
attr ConnectorAttribute ConnectorAttribute to retrieve the string value from.
return string

GetBasicAttributes() public static method

Filters out all special attributes from the set.
These special attributes include Password, Uid etc..
public static GetBasicAttributes ( ICollection attrs ) : ICollection
attrs ICollection set of s to filter out the operational and /// default attributes.
return ICollection

GetBigDecimalValue() public static method

Gets the big decimal value from the single value attribute.
Since 1.4
if the object in the attribute is not a big decimal. if the attribute is a multi valued instead of single valued.
public static GetBigDecimalValue ( ConnectorAttribute attr ) : BigDecimal
attr ConnectorAttribute ConnectorAttribute to retrieve the big decimal value from.
return BigDecimal

GetBigIntegerValue() public static method

Gets the big integer value from the single value attribute.
Since 1.4
if the object in the attribute is not a big integer. if the attribute is a multi valued instead of single valued.
public static GetBigIntegerValue ( ConnectorAttribute attr ) : BigInteger
attr ConnectorAttribute ConnectorAttribute to retrieve the big integer value from.
return BigInteger

GetBooleanValue() public static method

Gets the boolean value from the single value attribute.
if the object in the attribute is not a boolean. if the attribute is a multi valued instead of single valued.
public static GetBooleanValue ( ConnectorAttribute attr ) : bool?
attr ConnectorAttribute ConnectorAttribute to retrieve the boolean value from.
return bool?

GetByteArrayValue() public static method

Gets the byte value from the single value attribute.
Since 1.4
if the object in the attribute is not a byte. if the attribute is a multi valued instead of single valued.
public static GetByteArrayValue ( ConnectorAttribute attr ) : byte[]
attr ConnectorAttribute ConnectorAttribute to retrieve the byte value from.
return byte[]

GetByteValue() public static method

Gets the byte value from the single value attribute.
Since 1.4
if the object in the attribute is not a byte. if the attribute is a multi valued instead of single valued.
public static GetByteValue ( ConnectorAttribute attr ) : byte?
attr ConnectorAttribute ConnectorAttribute to retrieve the byte value from.
return byte?

GetCharacterValue() public static method

Gets the character value from the single value attribute.
Since 1.4
if the object in the attribute is not an string. if the attribute is a multi valued instead of single valued.
public static GetCharacterValue ( ConnectorAttribute attr ) : char?
attr ConnectorAttribute ConnectorAttribute to retrieve the character value from.
return char?

GetCurrentPasswordValue() public static method

Get the current password value from the provided set of ConnectorAttributes.
public static GetCurrentPasswordValue ( ICollection attrs ) : GuardedString
attrs ICollection Set of s that may contain the current password /// /// .
return GuardedString

GetDateTimeValue() public static method

Gets the date value from the single value attribute.
if the object in the attribute is not an long. if the attribute is a multi valued instead of single valued.
public static GetDateTimeValue ( ConnectorAttribute attr ) : DateTime?
attr ConnectorAttribute ConnectorAttribute to retrieve the date value from.
return DateTime?

GetDictionaryValue() public static method

Gets the dictionary value from the single value attribute.
Since 1.4
if the object in the attribute is not a dictionary. if the attribute is a multi valued instead of single valued.
public static GetDictionaryValue ( ConnectorAttribute attr ) : object>.IDictionary
attr ConnectorAttribute ConnectorAttribute to retrieve the dictionary value from.
return object>.IDictionary

GetDoubleValue() public static method

Gets the double value from the single value attribute.
if the object in the attribute is not a double. if the attribute is a multi valued instead of single valued.
public static GetDoubleValue ( ConnectorAttribute attr ) : double?
attr ConnectorAttribute ConnectorAttribute to retrieve the double value from.
return double?

GetEnableDate() public static method

Get the enable date from the set of attributes.
public static GetEnableDate ( ICollection attrs ) : DateTime?
attrs ICollection set of attribute to find the enable date /// .
return DateTime?

GetFloatValue() public static method

Gets the float value from the single value attribute.
Since 1.4
if the object in the attribute is not a float. if the attribute is a multi valued instead of single valued.
public static GetFloatValue ( ConnectorAttribute attr ) : float?
attr ConnectorAttribute ConnectorAttribute to retrieve the float value from.
return float?

GetGuardedByteArrayValue() public static method

Gets the guarded byte array value from the single value attribute.
Since 1.4
if the object in the attribute is not a guarded byte array. if the attribute is a multi valued instead of single valued.
public static GetGuardedByteArrayValue ( ConnectorAttribute attr ) : GuardedByteArray
attr ConnectorAttribute ConnectorAttribute to retrieve the guarded byte array value from.
return GuardedByteArray

GetGuardedStringValue() public static method

Gets the guarded string value from the single value attribute.
if the object in the attribute is not a guarded string. if the attribute is a multi valued instead of single valued.
public static GetGuardedStringValue ( ConnectorAttribute attr ) : GuardedString
attr ConnectorAttribute ConnectorAttribute to retrieve the guarded string value from.
return GuardedString

GetIntegerValue() public static method

Gets the integer value from the single value attribute.
if the object in the attribute is not an integer. if the attribute is a multi valued instead of single valued.
public static GetIntegerValue ( ConnectorAttribute attr ) : int?
attr ConnectorAttribute ConnectorAttribute to retrieve the integer value from.
return int?

GetLongValue() public static method

Gets the long value from the single value attribute.
if the object in the attribute is not an long. if the attribute is a multi valued instead of single valued.
public static GetLongValue ( ConnectorAttribute attr ) : long?
attr ConnectorAttribute ConnectorAttribute to retrieve the long value from.
return long?

GetNameFromAttributes() public static method

Gets the 'Name' attribute from a set of ConnectorAttributes.
public static GetNameFromAttributes ( ICollection attrs ) : Name
attrs ICollection set of attributes to search against.
return Name

GetPasswordExpirationDate() public static method

Retrieve the password expiration date from the ConnectorObject.
if the object does not contain attribute in question. if the parameter 'obj' is null.
public static GetPasswordExpirationDate ( ConnectorObject obj ) : DateTime?
obj ConnectorObject /// object to inspect.
return DateTime?

GetPasswordExpired() public static method

Get the password expired attribute from a Collection of ConnectorAttributes.
public static GetPasswordExpired ( ICollection attrs ) : bool?
attrs ICollection set of attribute to find the expired password /// .
return bool?

GetPasswordValue() public static method

Get the password value from the provided set of ConnectorAttributes.
public static GetPasswordValue ( ICollection attrs ) : GuardedString
attrs ICollection
return GuardedString

GetSingleValue() public static method

Get the single value from the ConnectorAttribute.
Return null if the attribute's list of values is null or empty.
public static GetSingleValue ( ConnectorAttribute attr ) : object
attr ConnectorAttribute
return object

GetSpecialAttributes() public static method

Filter out any basic attributes from the specified set, leaving only special attributes.
Special attributes include Name, Uid, and OperationalAttributes.
public static GetSpecialAttributes ( ICollection attrs ) : ICollection
attrs ICollection set of s to filter out the basic attributes
return ICollection

GetStringValue() public static method

Gets the string value from the single value attribute.
if the object in the attribute is not an string. if the attribute is a multi valued instead of single valued.
public static GetStringValue ( ConnectorAttribute attr ) : string
attr ConnectorAttribute ConnectorAttribute to retrieve the string value from.
return string

GetUidAttribute() public static method

Get the Uid from the attribute set.
public static GetUidAttribute ( ICollection attrs ) : Uid
attrs ICollection set of s that may contain a .
return Uid

IsEnabled() public static method

Determine if the ConnectorObject is enable.
By getting the value of the OperationalAttributes.ENABLE_NAME.
if the object does not contain attribute in question. if the parameter 'obj' is null.
public static IsEnabled ( ConnectorObject obj ) : bool?
obj ConnectorObject /// object to inspect.
return bool?

IsLockedOut() public static method

Determine if the ConnectorObject is locked out.
By getting the value of the OperationalAttributes.LOCK_OUT_NAME.
if the parameter 'obj' is null.
public static IsLockedOut ( ConnectorObject obj ) : bool?
obj ConnectorObject /// object to inspect.
return bool?

IsPasswordExpired() public static method

Determine if the password is expired for this object.
public static IsPasswordExpired ( ConnectorObject obj ) : bool?
obj ConnectorObject /// that should contain a password expired /// attribute.
return bool?

IsSpecial() public static method

Determines if this attribute is a special attribute.
if the attribute parameter is null.
public static IsSpecial ( ConnectorAttribute attr ) : bool
attr ConnectorAttribute /// to test for against.
return bool

IsSpecial() public static method

Determines if this attribute is a special attribute.
if the attribute parameter is null.
public static IsSpecial ( ConnectorAttributeInfo attr ) : bool
attr ConnectorAttributeInfo /// to test for against.
return bool

IsSpecialName() public static method

Determines whether the specified attribute name is special in the sense of ConnectorAttributeUtil.CreateSpecialName.
public static IsSpecialName ( String name ) : bool
name String the name of the attribute to test
return bool

NamesEqual() public static method

Compares two attribute names for equality.
public static NamesEqual ( string name1, string name2 ) : bool
name1 string the first attribute name
name2 string the second attribute name
return bool

ToMap() public static method

Transform a Collection of ConnectorAttribute} instances into a {@link Map}. The key to each element in the map is the name of an ConnectorAttribute. The value of each element in the map is the ConnectorAttribute instance with that name.
public static ToMap ( ICollection attributes ) : ConnectorAttribute>.IDictionary
attributes ICollection
return ConnectorAttribute>.IDictionary