Code Review
/
aaf
/
authz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add OneWeekCred notice
[aaf/authz.git]
/
auth
/
auth-deforg
/
src
/
main
/
java
/
org
/
onap
/
aaf
/
org
/
DefaultOrgIdentity.java
diff --git
a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrgIdentity.java
b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrgIdentity.java
index
2583262
..
f2b9d8c
100644
(file)
--- a/
auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrgIdentity.java
+++ b/
auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrgIdentity.java
@@
-45,7
+45,7
@@
public class DefaultOrgIdentity implements Identity {
private static final String APPLICATION = "a";
private static final String NON_ACTIVE = "n";
private static final String APPLICATION = "a";
private static final String NON_ACTIVE = "n";
-
private
final static int TIMEOUT = Integer.parseInt(Config.AAF_CONN_TIMEOUT_DEF);
+ final static int TIMEOUT = Integer.parseInt(Config.AAF_CONN_TIMEOUT_DEF);
private DefaultOrg org;
//package on purpose
private DefaultOrg org;
//package on purpose
@@
-62,7
+62,7
@@
public class DefaultOrgIdentity implements Identity {
Reuse r = org.identities.reuse();
int at = key.indexOf(dorg.getDomain());
String search;
Reuse r = org.identities.reuse();
int at = key.indexOf(dorg.getDomain());
String search;
- if(at>=0) {
+ if
(at>=0) {
search = key.substring(0,at);
} else {
search = key;
search = key.substring(0,at);
} else {
search = key;
@@
-71,7
+71,7
@@
public class DefaultOrgIdentity implements Identity {
- if(identity==null) {
+ if
(identity==null) {
identity = Identities.NO_DATA;
}
} finally {
identity = Identities.NO_DATA;
}
} finally {
@@
-84,7
+84,7
@@
public class DefaultOrgIdentity implements Identity {
@Override
public boolean equals(Object b) {
@Override
public boolean equals(Object b) {
- if(b instanceof DefaultOrgIdentity) {
+ if
(b instanceof DefaultOrgIdentity) {
return identity.id.equals(((DefaultOrgIdentity)b).identity.id);
}
return false;
return identity.id.equals(((DefaultOrgIdentity)b).identity.id);
}
return false;
@@
-120,7
+120,7
@@
public class DefaultOrgIdentity implements Identity {
@Override
public Identity responsibleTo() throws OrganizationException {
@Override
public Identity responsibleTo() throws OrganizationException {
- if("".equals(identity.responsibleTo) && isFound()) { // cover the situation of Top Dog... reports to no-one.
+ if
("".equals(identity.responsibleTo) && isFound()) { // cover the situation of Top Dog... reports to no-one.
return this;
} else {
return org.getIdentity(trans, identity.responsibleTo);
return this;
} else {
return org.getIdentity(trans, identity.responsibleTo);
@@
-151,9
+151,9
@@
public class DefaultOrgIdentity implements Identity {
@Override
public String mayOwn() {
// Assume only Employees are responsible for Resources.
@Override
public String mayOwn() {
// Assume only Employees are responsible for Resources.
- if(identity.status==null|| identity.status.length()==0) {
+ if
(identity.status==null|| identity.status.length()==0) {
return "Identity must have valid status";
return "Identity must have valid status";
- } else if(EMPLOYEE.equals(identity.status)) {
+ } else if
(EMPLOYEE.equals(identity.status)) {
return null; // This is "Yes, is Responsible"
} else {
return "Reponsible Party must be an Employee";
return null; // This is "Yes, is Responsible"
} else {
return "Reponsible Party must be an Employee";