diff options
Diffstat (limited to 'authz-batch/src/main/java/com/att/authz/entryConverters/PermEntryConverter.java')
-rw-r--r-- | authz-batch/src/main/java/com/att/authz/entryConverters/PermEntryConverter.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/authz-batch/src/main/java/com/att/authz/entryConverters/PermEntryConverter.java b/authz-batch/src/main/java/com/att/authz/entryConverters/PermEntryConverter.java new file mode 100644 index 00000000..afabdfdf --- /dev/null +++ b/authz-batch/src/main/java/com/att/authz/entryConverters/PermEntryConverter.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. + *******************************************************************************/ +package com.att.authz.entryConverters; + +import com.att.dao.aaf.cass.PermDAO; +import com.googlecode.jcsv.writer.CSVEntryConverter; + +public class PermEntryConverter extends AafEntryConverter implements CSVEntryConverter<PermDAO.Data> { + + @Override + public String[] convertEntry(PermDAO.Data pd) { + String[] columns = new String[6]; + + columns[0] = pd.ns; + columns[1] = pd.type; + columns[2] = pd.instance; + columns[3] = pd.action; + columns[4] = formatSet(pd.roles); + columns[5] = pd.description==null?"":pd.description; + + return columns; + } +} |