Skip to content

Commit

Permalink
MID-3555 moved emailAddress, telephoneNumber, preferredLanguage, time…
Browse files Browse the repository at this point in the history
…zone and locale from user to focus
  • Loading branch information
1azyman committed Feb 20, 2018
1 parent 0a9dcf7 commit ede3c05
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 179 deletions.
Expand Up @@ -313,7 +313,7 @@ ThreadStopActionType.CLOSE=Close
ThreadStopActionType.RESCHEDULE=Reschedule
ThreadStopActionType.RESTART=Restart
ThreadStopActionType.SUSPEND=Suspend
UserType.emailAddress=Email
FocusType.emailAddress=Email
UserType.familyName=Family name
UserType.fullName=Full name
UserType.givenName=Given name
Expand Down Expand Up @@ -363,10 +363,9 @@ UserType.nickname=Nickname
UserType.honorificPrefix=Honorific Prefix
UserType.honorificSuffix=Honorific Suffix
UserType.title=Title
UserType.preferredLanguage=Preferred Language
UserType.locale=Locale
UserType.timezone=Timezone
UserType.EmailAddress=Email Address
FocusType.preferredLanguage=Preferred Language
FocusType.locale=Locale
FocusType.timezone=Timezone
UserType.telephoneNumber=Telephone Number
UserType.employeeNumber=Employee Number
UserType.employeeType=Employee Type
Expand Down
238 changes: 119 additions & 119 deletions infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd
Expand Up @@ -2698,6 +2698,125 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="preferredLanguage" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
Indicates user's preferred language, usually for the purpose of localizing
user interfaces. The format is IETF language tag defined in BCP 47, where
underscore is used as a subtag separator. This is usually a ISO 639-1 two-letter
language code optionally followed by ISO 3166-1 two letter country code
separated by underscore. The languages that do not have coutry-specific
variants are usually specified by using a two-letter coutry code ("sk",
"cs", "tr"). Languages with coutry-specific variants have country-specific
subtags ("pt_BR", "zn_CN").
If no value is specified in this property then system default locale is assumed.
</p>
<p>
Examples:
<ul>
<li>en_US</li>
<li>sk</li>
<li>cs</li>
<li>pt_BR</li>
</ul>
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>FocusType.preferredLanguage</a:displayName>
<a:displayOrder>200</a:displayOrder>
<a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000200" type="tns:LookupTableType"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="locale" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
Defines user's preference in displaying currency, dates and other items
related to location and culture. The format is IETF language tag defined in BCP 47, where
underscore is used as a subtag separator. This is usually a ISO 639-1 two-letter
language code optionally followed by ISO 3166-1 two letter country code
separated by underscore. The languages that do not have coutry-specific
variants are usually specified by using a two-letter coutry code ("sk",
"cs", "tr"). Languages with coutry-specific variants have country-specific
subtags ("pt_BR", "zn_CN").
If not specified then system default locale is assumed.
</p>
<p>
Examples:
<ul>
<li>en_US</li>
<li>sk</li>
<li>cs</li>
<li>pt_BR</li>
</ul>
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>FocusType.locale</a:displayName>
<a:displayOrder>210</a:displayOrder>
<a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000210" type="tns:LookupTableType"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="timezone" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
User's preferred timezone. It is specified in the "tz database" (a.k.a "Olson")
format. If not specified then system default timezone is assumed.
</p>
<p>
Examples:
<ul>
<li>Europe/Bratislava</li>
</ul>
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>FocusType.timezone</a:displayName>
<a:displayOrder>220</a:displayOrder>
<a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000220" type="tns:LookupTableType"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="emailAddress" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
E-Mail address of the user, org. unit, etc. This is the address
supposed to be used for communication with the
user, org. unit, etc. E.g. IDM system may send notifications
to the e-mail address. It is NOT supposed to be
full-featured e-mail address data structure
e.g. for the purpose of complex address-book application.
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>FocusType.emailAddress</a:displayName>
<a:displayOrder>300</a:displayOrder>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="telephoneNumber" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
Primary telephone number of the user, org. unit, etc.
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>FocusType.telephoneNumber</a:displayName>
<a:displayOrder>310</a:displayOrder>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

</xsd:sequence>
</xsd:extension>
Expand Down Expand Up @@ -2934,125 +3053,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="preferredLanguage" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
Indicates user's preferred language, usually for the purpose of localizing
user interfaces. The format is IETF language tag defined in BCP 47, where
underscore is used as a subtag separator. This is usually a ISO 639-1 two-letter
language code optionally followed by ISO 3166-1 two letter country code
separated by underscore. The languages that do not have coutry-specific
variants are usually specified by using a two-letter coutry code ("sk",
"cs", "tr"). Languages with coutry-specific variants have country-specific
subtags ("pt_BR", "zn_CN").
If no value is specified in this property then system default locale is assumed.
</p>
<p>
Examples:
<ul>
<li>en_US</li>
<li>sk</li>
<li>cs</li>
<li>pt_BR</li>
</ul>
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserType.preferredLanguage</a:displayName>
<a:displayOrder>200</a:displayOrder>
<a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000200" type="tns:LookupTableType"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="locale" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
Defines user's preference in displaying currency, dates and other items
related to location and culture. The format is IETF language tag defined in BCP 47, where
underscore is used as a subtag separator. This is usually a ISO 639-1 two-letter
language code optionally followed by ISO 3166-1 two letter country code
separated by underscore. The languages that do not have coutry-specific
variants are usually specified by using a two-letter coutry code ("sk",
"cs", "tr"). Languages with coutry-specific variants have country-specific
subtags ("pt_BR", "zn_CN").
If not specified then system default locale is assumed.
</p>
<p>
Examples:
<ul>
<li>en_US</li>
<li>sk</li>
<li>cs</li>
<li>pt_BR</li>
</ul>
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserType.locale</a:displayName>
<a:displayOrder>210</a:displayOrder>
<a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000210" type="tns:LookupTableType"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="timezone" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
User's preferred timezone. It is specified in the "tz database" (a.k.a "Olson")
format. If not specified then system default timezone is assumed.
</p>
<p>
Examples:
<ul>
<li>Europe/Bratislava</li>
</ul>
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserType.timezone</a:displayName>
<a:displayOrder>220</a:displayOrder>
<a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000220" type="tns:LookupTableType"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="emailAddress" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
E-Mail address of the user. This is the address
supposed to be used for communication with the
user. E.g. IDM system may send notifications
to the e-mail address. It is NOT supposed to be
full-featured e-mail address data structure
e.g. for the purpose of complex address-book application.
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserType.EmailAddress</a:displayName>
<a:displayOrder>300</a:displayOrder>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="telephoneNumber" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<p>
Primary telephone number of the user.
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserType.telephoneNumber</a:displayName>
<a:displayOrder>310</a:displayOrder>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="employeeNumber" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
Expand Down
Expand Up @@ -73,6 +73,12 @@ public abstract class RFocus<T extends FocusType> extends RObject<T> {
private RPolyString localityFocus;
private String costCenter;

private String emailAddress;
private String telephoneNumber;
private String locale;
private String timezone;
private String preferredLanguage;

@Where(clause = RObjectReference.REFERENCE_TYPE + "= 1")
@OneToMany(mappedBy = "owner", orphanRemoval = true)
@ForeignKey(name = "none")
Expand Down Expand Up @@ -182,6 +188,46 @@ public String getCostCenter() {
return costCenter;
}

public String getEmailAddress() {
return emailAddress;
}

public String getTelephoneNumber() {
return telephoneNumber;
}

public String getLocale() {
return locale;
}

public String getPreferredLanguage() {
return preferredLanguage;
}

public String getTimezone() {
return timezone;
}

public void setLocale(String locale) {
this.locale = locale;
}

public void setPreferredLanguage(String preferredLanguage) {
this.preferredLanguage = preferredLanguage;
}

public void setTimezone(String timezone) {
this.timezone = timezone;
}

public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}

public void setTelephoneNumber(String telephoneNumber) {
this.telephoneNumber = telephoneNumber;
}

public void setCostCenter(String costCenter) {
this.costCenter = costCenter;
}
Expand Down Expand Up @@ -233,6 +279,14 @@ public boolean equals(Object o) {
if (policySituation != null ? !policySituation.equals(other.policySituation) : other.policySituation != null) return false;
if (localityFocus != null ? !localityFocus.equals(other.localityFocus) : other.localityFocus != null) return false;
if (costCenter != null ? !costCenter.equals(other.costCenter) : other.costCenter != null) return false;
if (emailAddress != null ? !emailAddress.equals(other.emailAddress) : other.emailAddress != null) return false;
if (telephoneNumber != null ? !telephoneNumber.equals(other.telephoneNumber) : other.telephoneNumber != null)
return false;
if (locale != null ? !locale.equals(other.locale) : other.locale != null) return false;
if (preferredLanguage != null ? !preferredLanguage.equals(other.preferredLanguage) :
other.preferredLanguage != null) return false;
if (timezone != null ? !timezone.equals(other.timezone) : other.timezone != null) return false;


return true;
}
Expand All @@ -243,6 +297,9 @@ public int hashCode() {
result = 31 * result + (activation != null ? activation.hashCode() : 0);
result = 31 * result + (localityFocus != null ? localityFocus.hashCode() : 0);
result = 31 * result + (costCenter != null ? costCenter.hashCode() : 0);
result = 31 * result + (locale != null ? locale.hashCode() : 0);
result = 31 * result + (preferredLanguage != null ? preferredLanguage.hashCode() : 0);
result = 31 * result + (timezone != null ? timezone.hashCode() : 0);

return result;
}
Expand Down

0 comments on commit ede3c05

Please sign in to comment.