Reorganized function order
This commit is contained in:
parent
904e475f2f
commit
f00127a82a
|
@ -31,8 +31,8 @@ import org.gcube.gcat.oldutils.Validator;
|
|||
import org.gcube.gcat.profile.MetadataUtility;
|
||||
import org.gcube.gcat.social.PortalUser;
|
||||
import org.gcube.gcat.social.SocialPost;
|
||||
import org.gcube.gcat.social.ZulipStream;
|
||||
import org.gcube.gcat.utils.URIResolver;
|
||||
import org.gcube.gcat.zulip.ZulipStream;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -647,14 +647,6 @@ public class CKANPackage extends CKAN {
|
|||
return cmItemStatus;
|
||||
}
|
||||
|
||||
protected boolean isModerationEnabled() {
|
||||
boolean moderationEnabled = ckanInstance.isModerationEnabled();
|
||||
if(moderationEnabled && zulipStream==null) {
|
||||
zulipStream = new ZulipStream("user@zulip.com", "apikey");
|
||||
}
|
||||
return moderationEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String read() {
|
||||
try {
|
||||
|
@ -965,7 +957,16 @@ public class CKANPackage extends CKAN {
|
|||
* ----------------------------------------------------------------------------------------
|
||||
*
|
||||
*/
|
||||
private void createNewStream() {
|
||||
|
||||
protected boolean isModerationEnabled() {
|
||||
boolean moderationEnabled = ckanInstance.isModerationEnabled();
|
||||
if(moderationEnabled && zulipStream==null) {
|
||||
zulipStream = new ZulipStream("user@zulip.com", "apikey");
|
||||
}
|
||||
return moderationEnabled;
|
||||
}
|
||||
|
||||
private void createNewStream() throws Exception {
|
||||
String itemName = result.get(name).asText();
|
||||
zulipStream.setItemCoordinates(itemID, itemName);
|
||||
zulipStream.setCKANUser(ckanUser);
|
||||
|
|
Loading…
Reference in New Issue