Make LINKED into a virtual status value

* Remove LINKED when loading an EppResource
* Enforce that you can't add it to a resource
* Ignore LINKED on xjc import of contacts and hosts

After running ResaveAllEppResourcesAction we will no
longer have persisted LINKED statuses in datastore.

In the process of writing this I discovered that RDAP
treats LINKED like any other status value and returns
the persisted value rather than the derived one. Since
this is an existing bug and is orthogonal to the changes
in this CL, I am addressing it in a separate CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145585227
This commit is contained in:
cgoldfeder 2017-01-25 12:59:26 -08:00 committed by Ben McIlwain
parent 4a730e0c9e
commit 0b1781b110
10 changed files with 68 additions and 73 deletions

View file

@ -44,7 +44,16 @@ public enum StatusValue implements EppEnum {
CLIENT_TRANSFER_PROHIBITED,
CLIENT_UPDATE_PROHIBITED,
INACTIVE,
/**
* A status that means a resource has an incoming reference from an active domain.
*
* <p>LINKED is a "virtual" status value that should never be persisted to Datastore on any
* resource. It must be computed on the fly when we need it, as the set of domains using a
* resource can change at any time.
*/
LINKED,
OK,
PENDING_CREATE,
PENDING_DELETE,