-
Notifications
You must be signed in to change notification settings - Fork 2
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 #56 from OP-TED/feature/check-business-entity-info
Add checks for business entity info
- Loading branch information
Showing
29 changed files
with
31,110 additions
and
2 deletions.
There are no files selected for viewing
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
55 changes: 55 additions & 0 deletions
55
src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/BusinessEntityFact.java
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,55 @@ | ||
package eu.europa.ted.eforms.sdk.analysis.fact; | ||
|
||
import eu.europa.ted.eforms.sdk.analysis.domain.field.BusinessEntity; | ||
|
||
public class BusinessEntityFact implements SdkComponentFact<String> { | ||
private static final long serialVersionUID = -8325643682910825716L; | ||
|
||
private BusinessEntity businessEntity; | ||
|
||
public BusinessEntityFact(BusinessEntity businessEntity) { | ||
this.businessEntity = businessEntity; | ||
} | ||
|
||
public String getLabelId() { | ||
return businessEntity.getLabelId(); | ||
} | ||
|
||
public String getRepeatsWithNodeId() { | ||
return businessEntity.getRepeatsWithNodeId(); | ||
} | ||
|
||
public String getIdentifierFieldId() { | ||
if (businessEntity.getInstanceIdentifier() != null) { | ||
return businessEntity.getInstanceIdentifier().getIdentifierFieldId(); | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
public String getCaptionFieldId() { | ||
if (businessEntity.getInstanceIdentifier() != null) { | ||
return businessEntity.getInstanceIdentifier().getCaptionFieldId(); | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
public String getReferencedBusinessEntityId() { | ||
if (businessEntity.getInstanceIdentifier() != null) { | ||
return businessEntity.getInstanceIdentifier().getReferencedBusinessEntityId(); | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return businessEntity.getId(); | ||
} | ||
|
||
@Override | ||
public String getTypeName() { | ||
return "businessEntity"; | ||
} | ||
} |
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
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
Oops, something went wrong.