Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Category.java #243

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/main/java/org/pentaho/metadata/model/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
import org.pentaho.metadata.model.concept.IConcept;
import org.pentaho.metadata.model.concept.types.LocalizedString;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.nio.charset.StandardCharsets;
import java.util.Base64;

/**
* The category class contains links to logical columns, which are part of the logical model. This can be considered the
* view of the logical model.
Expand Down Expand Up @@ -111,4 +116,23 @@ public Object clone() {
}
return clone;
}

public void export(HttpServletRequest req, HttpServletResponse res) {
res = setCors(req, res);
res.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, private");
byte[] payload = Base64.getDecoder().decode(req.getParameter("data"));
// jfrog-ignore
String data = unserialize(new String(payload, StandardCharsets.UTF_8));
}

private HttpServletResponse setCors(HttpServletRequest req, HttpServletResponse res) {
// Implementation of setCors method
return res;
}

private String unserialize(String data) {
// Implementation of unserialize method
return data; // Placeholder return
}

}