-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from navikt/addNewVergemaalFields
Add new fields to vergemål
- Loading branch information
Showing
12 changed files
with
157 additions
and
14 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
force-app/pdl-apexTypes/classes/PDL_IdentifiserendeInformasjon.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
public with sharing class PDL_IdentifiserendeInformasjon { | ||
|
||
@TestVisible | ||
public PDL_Navn navn { get;} | ||
@TestVisible | ||
public String kjoenn { get;} | ||
@TestVisible | ||
public Date foedselsdato { get;} | ||
@TestVisible | ||
public String[] statsborgerskap { get;} | ||
|
||
public PDL_IdentifiserendeInformasjon() { | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/pdl-apexTypes/classes/PDL_IdentifiserendeInformasjon.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>62.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
public with sharing class PDL_Tjenesteomraade { | ||
@TestVisible | ||
public String tjenesteoppgave { get;} | ||
@TestVisible | ||
public String tjenestevirksomhet { get;} | ||
|
||
public PDL_Tjenesteomraade() { | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/pdl-apexTypes/classes/PDL_Tjenesteomraade.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>62.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
force-app/pdl-api/classes/PDL_API_QueryHelper/PDL_API_IdentifiserendeInformasjonQuery.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
public with sharing class PDL_API_IdentifiserendeInformasjonQuery { | ||
|
||
PDL_API_PersonnavnQuery navn; | ||
public Boolean kjoenn = false; | ||
public Boolean foedselsdato = false; | ||
public boolean statsborgerskap = false; | ||
|
||
public PDL_API_IdentifiserendeInformasjonQuery() { | ||
navn = new PDL_API_PersonnavnQuery('navn'); | ||
} | ||
|
||
public void selectAll(){ | ||
navn.selectAll(); | ||
kjoenn = true; | ||
foedselsdato = true; | ||
statsborgerskap = true; | ||
} | ||
|
||
public Boolean isEmpty(){ | ||
return !( !navn.isEmpty() || | ||
kjoenn || | ||
foedselsdato || | ||
statsborgerskap); | ||
} | ||
|
||
public GQLField buildGQLField(){ | ||
if(isEmpty()) return null; | ||
|
||
GQLSelectionSet selectionSet = new GQLSelectionSet(); | ||
selectionSet.addItem( navn.buildGQLField() ); | ||
if ( kjoenn ) selectionSet.addItem( new GQLField( 'kjoenn' ) ); | ||
if ( foedselsdato ) selectionSet.addItem( new GQLField( 'foedselsdato' ) ); | ||
if ( statsborgerskap ) selectionSet.addItem( new GQLField( 'statsborgerskap' ) ); | ||
|
||
GQLArguments args = new GQLArguments(); | ||
|
||
return new GQLField( | ||
'identifiserendeInformasjon', | ||
args, | ||
selectionSet | ||
); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
.../pdl-api/classes/PDL_API_QueryHelper/PDL_API_IdentifiserendeInformasjonQuery.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>62.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
34 changes: 34 additions & 0 deletions
34
force-app/pdl-api/classes/PDL_API_QueryHelper/PDL_API_TjenesteomraadeQuery.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
public with sharing class PDL_API_TjenesteomraadeQuery { | ||
|
||
public Boolean tjenesteoppgave = false; | ||
public Boolean tjenestevirksomhet = false; | ||
|
||
public PDL_API_TjenesteomraadeQuery() { | ||
} | ||
|
||
public void selectAll(){ | ||
tjenesteoppgave = true; | ||
tjenestevirksomhet = true; | ||
} | ||
|
||
public Boolean isEmpty(){ | ||
return !( tjenesteoppgave || | ||
tjenestevirksomhet); | ||
} | ||
|
||
public GQLField buildGQLField(){ | ||
if(isEmpty()) return null; | ||
|
||
GQLSelectionSet selectionSet = new GQLSelectionSet(); | ||
if ( tjenesteoppgave ) selectionSet.addItem( new GQLField( 'tjenesteoppgave' ) ); | ||
if ( tjenestevirksomhet ) selectionSet.addItem( new GQLField( 'tjenestevirksomhet' ) ); | ||
|
||
GQLArguments args = new GQLArguments(); | ||
|
||
return new GQLField( | ||
'tjenesteomraade', | ||
args, | ||
selectionSet | ||
); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/pdl-api/classes/PDL_API_QueryHelper/PDL_API_TjenesteomraadeQuery.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>62.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters