summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java84
1 files changed, 42 insertions, 42 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java
index 693f444f..736e7cbb 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java
@@ -14,50 +14,50 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package at.gv.egiz.bku.slcommands.impl;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+package at.gv.egiz.bku.slcommands.impl;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType;
import at.gv.egiz.bku.slcommands.InfoboxReadCommand;
import at.gv.egiz.bku.slcommands.SLCommandContext;
import at.gv.egiz.bku.slcommands.SLResult;
import at.gv.egiz.bku.slexceptions.SLCommandException;
-
-/**
- * This class implements the security layer command
- * <code>InfoboxReadRequest</code>.
- * <p>
- * <b>NOTE:</b> Currently the only supported infobox identifier is '
- * <code>IdentityLink</code>'.
- * </p>
- *
- * @author mcentner
- */
-public class InfoboxReadCommandImpl extends AbstractInfoboxCommandImpl<InfoboxReadRequestType> implements
- InfoboxReadCommand {
-
- /**
- * Logging facility.
- */
- protected static Log log = LogFactory.getLog(InfoboxReadCommandImpl.class);
+
+/**
+ * This class implements the security layer command
+ * <code>InfoboxReadRequest</code>.
+ * <p>
+ * <b>NOTE:</b> Currently the only supported infobox identifier is '
+ * <code>IdentityLink</code>'.
+ * </p>
+ *
+ * @author mcentner
+ */
+public class InfoboxReadCommandImpl extends AbstractInfoboxCommandImpl<InfoboxReadRequestType> implements
+ InfoboxReadCommand {
+
+ /**
+ * Logging facility.
+ */
+ protected final Logger log = LoggerFactory.getLogger(InfoboxReadCommandImpl.class);
- @Override
- public String getName() {
- return "InfoboxReadRequest";
- }
-
+ @Override
+ public String getName() {
+ return "InfoboxReadRequest";
+ }
+
@Override
protected String getInfoboxIdentifier(InfoboxReadRequestType request) {
return request.getInfoboxIdentifier();
}
- @Override
- public void init(SLCommandContext ctx, Object request) throws SLCommandException {
- super.init(ctx, request);
-
- InfoboxReadRequestType req = getRequestValue();
+ @Override
+ public void init(Object request) throws SLCommandException {
+ super.init(request);
+
+ InfoboxReadRequestType req = getRequestValue();
if (req.getAssocArrayParameters() != null &&
!(infobox instanceof AssocArrayInfobox)) {
@@ -70,20 +70,20 @@ public class InfoboxReadCommandImpl extends AbstractInfoboxCommandImpl<InfoboxRe
log.info("Got BinaryFileParameters but Infobox type is not BinaryFile.");
throw new SLCommandException(4010);
}
-
- }
-
- @Override
- public SLResult execute() {
+
+ }
+
+ @Override
+ public SLResult execute(SLCommandContext commandContext) {
try {
- return infobox.read(getRequestValue(), getCmdCtx());
+ return infobox.read(getRequestValue(), commandContext);
} catch (SLCommandException e) {
- return new ErrorResultImpl(e, getCmdCtx().getLocale());
+ return new ErrorResultImpl(e, commandContext.getLocale());
}
- }
-
+ }
+
@Override
public String getIdentityLinkDomainId() {
if (infobox instanceof IdentityLinkInfoboxImpl) {
@@ -93,4 +93,4 @@ public class InfoboxReadCommandImpl extends AbstractInfoboxCommandImpl<InfoboxRe
}
}
-}
+}