Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
c81feefb
Commit
c81feefb
authored
8 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
utils to build standard statuses
refs 2553
parent
ac146e54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java
+49
-1
49 additions, 1 deletion
...rc/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java
with
49 additions
and
1 deletion
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java
+
49
−
1
View file @
c81feefb
...
...
@@ -17,8 +17,13 @@ $Id$
+--------------------------------------------------------------------------*/
package
org.fortiss.tooling.kernel.utils
;
import
org.fortiss.tooling.kernel.model.constraints.ConstraintsFactory
;
import
org.fortiss.tooling.kernel.model.constraints.ErrorVerificationStatus
;
import
org.fortiss.tooling.kernel.model.constraints.FailVerificationStatus
;
import
org.fortiss.tooling.kernel.model.constraints.IConstrained
;
import
org.fortiss.tooling.kernel.model.constraints.IConstraint
;
import
org.fortiss.tooling.kernel.model.constraints.OutdatedVerificationStatus
;
import
org.fortiss.tooling.kernel.model.constraints.SuccessVerificationStatus
;
/**
* Utility methods for dealing with constraints.
...
...
@@ -26,7 +31,7 @@ import org.fortiss.tooling.kernel.model.constraints.IConstrained;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
EB6052B149CC1CD6CCAE56C42A7C3E3D
* @ConQAT.Rating YELLOW Hash:
1EE7F9BAEAF62D5E8C843797A8177D77
*/
public
class
ConstraintsUtils
{
/**
...
...
@@ -50,4 +55,47 @@ public class ConstraintsUtils {
this
.
error
=
error
;
}
}
/**
* @param c
* @return A "success" verification status for <code>c</code>.
*/
public
static
SuccessVerificationStatus
createSuccessVerificationStatus
(
IConstraint
c
)
{
SuccessVerificationStatus
s
=
ConstraintsFactory
.
eINSTANCE
.
createSuccessVerificationStatus
();
c
.
setVerificationStatus
(
s
);
return
s
;
}
/**
* @param c
* @return A "outdated" verification status for <code>c</code>.
*/
public
static
OutdatedVerificationStatus
createOutdatedVerificationStatus
(
IConstraint
c
)
{
OutdatedVerificationStatus
status
=
ConstraintsFactory
.
eINSTANCE
.
createOutdatedVerificationStatus
();
c
.
setVerificationStatus
(
status
);
return
status
;
}
/**
* @param c
* @return A "fail" verification status for <code>c</code>.
*/
public
static
FailVerificationStatus
createFailVerificationStatus
(
IConstraint
c
)
{
FailVerificationStatus
status
=
ConstraintsFactory
.
eINSTANCE
.
createFailVerificationStatus
();
c
.
setVerificationStatus
(
status
);
return
status
;
}
/**
* @param c
* @return An "error" verification status for <code>c</code>.
*/
public
static
ErrorVerificationStatus
createErrorVerificationStatus
(
IConstraint
c
)
{
ErrorVerificationStatus
status
=
ConstraintsFactory
.
eINSTANCE
.
createErrorVerificationStatus
();
c
.
setVerificationStatus
(
status
);
return
status
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment