d752e323 by Adam Heath

Remove some stale code.

1 parent 3ccfe521
...@@ -95,94 +95,6 @@ class HookSynchronization implements Synchronization { ...@@ -95,94 +95,6 @@ class HookSynchronization implements Synchronization {
95 } 95 }
96 } 96 }
97 97
98 /*
99 class HookXAResource implements XAResource {
100 private static class EntityPk {
101 protected String entityName;
102 protected Map<String, Object> pk;
103
104 protected EntityPk(EntityValue entity) {
105 this.entityName = entity.getEntityName()
106 this.pk = entity.getPrimaryKeys()
107 }
108
109 public boolean equals(Object other) {
110 if (!(object instanceof EntityPk)) {
111 return false
112 }
113 EntityPk that = (EntityPk) other
114 return entityName.equals(that.entityName) && pk.equals(that.pk)
115 }
116
117 public int hashCode() {
118 return entityName.hashCode ^ pk.hashCode()
119 }
120 }
121
122 private Map<Xid, Set<EntityPk>> modifiedValues = new HashMap<>()
123 private int timeout = 60
124
125 @Override
126 public void commit(Xid xid, boolean onePhase) {
127
128 }
129
130 @Override
131 public void end(Xid xid, int flags) {
132 if (flags & TMFAIL) {
133
134 } else if (flags & TMSUSPEND) {
135
136 } else if (flags & TMSUCCESS) {
137
138 }
139 }
140
141 @Override
142 public void forget(Xid xid) {
143 modifiedValues.remove(xid)
144 }
145
146 @Override
147 public int getTransactionTimeout() {
148 return timeout
149 }
150
151 @Override
152 public boolean isSameRM(XAResource xar) {
153 return getClass().equals(xar.getClass())
154 }
155
156 @Override
157 public int prepare(Xid xid) {
158 if (!keycloak.connected()) {
159 throw new XAException(XAException.XAERR_RMFAIL)
160 }
161 }
162
163 @Override
164 public Xid[] recover(int flag) {
165
166 }
167
168 @Override
169 public void rollback(Xid xid) {
170
171 }
172
173 @Override
174 public boolean setTransactionTimeout(int timeout) {
175 this.timeout = timeout
176 }
177
178 @Override
179 public void start(Xid xid, int flags) {
180
181 }
182
183 }
184 */
185
186 HookSynchronization getHookSync() { 98 HookSynchronization getHookSync() {
187 HookSynchronization hookSync = ec.transaction.getActiveSynchronization(getClass().getName()) 99 HookSynchronization hookSync = ec.transaction.getActiveSynchronization(getClass().getName())
188 if (hookSync == null) { 100 if (hookSync == null) {
......
...@@ -458,15 +458,4 @@ void updateUser(String keycloakUserId, String userId) { ...@@ -458,15 +458,4 @@ void updateUser(String keycloakUserId, String userId) {
458 userRep.setEnabled("N".equals(userAccount.disabled)) 458 userRep.setEnabled("N".equals(userAccount.disabled))
459 459
460 userResource.update(userRep) 460 userResource.update(userRep)
461 Map<String, Object> foo = userResource.impersonate()
462 logger.info("impersonate: foo=${foo}")
463 } 461 }
464
465 Map<String, Object> getKeycloakUsers() {
466 try {
467 updateUser('c6f99571-a79d-4267-b76e-a02a6847c8c9', '100000')
468 } finally {
469 cleanupKeycloak()
470 }
471 }
472
......
...@@ -53,16 +53,4 @@ along with this software (see the LICENSE.md file). If not, see ...@@ -53,16 +53,4 @@ along with this software (see the LICENSE.md file). If not, see
53 <parameter name="partyClassificationId" type="String" required="true"/> 53 <parameter name="partyClassificationId" type="String" required="true"/>
54 </in-parameters> 54 </in-parameters>
55 </service> 55 </service>
56
57 <service verb="get" noun="KeycloakUsers" type="script" location="component://moqui-keycloak/service/keycloak/KeycloakServices.groovy" method="getKeycloakUsers">
58 </service>
59
60 <!--
61 <service verb="update" noun="PasswordInternal" type="script" location="component://moqui-keycloak/service/keycloak/KeycloakServices.groovy" method="updatePasswordInternal" authenticate="anonymous-all">
62 <in-parameters>
63 <parameter name="userId" type="String" required="true"/>
64 <parameter name="newPassword" type="String" required="true"/>
65 </in-parameters>
66 </service>
67 -->
68 </services> 56 </services>
......