Search in sources :

Example 76 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.

the class ChainingRegisteredServiceAccessStrategy method getRequiredAttributes.

@Override
@JsonIgnore
public Map<String, Set<String>> getRequiredAttributes() {
    val results = new LinkedHashMap<String, List<Object>>();
    val merger = CoreAuthenticationUtils.getAttributeMerger(PrincipalAttributesCoreProperties.MergingStrategyTypes.MULTIVALUED);
    strategies.forEach(strategy -> {
        val requiredAttributes = strategy.getRequiredAttributes().entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, mapper -> new ArrayList<>(mapper.getValue())));
        merger.mergeAttributes(results, (Map) requiredAttributes);
    });
    return (Map) results.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, mapper -> new LinkedHashSet<>(mapper.getValue())));
}
Also used : lombok.val(lombok.val) Setter(lombok.Setter) Arrays(java.util.Arrays) Getter(lombok.Getter) NonNull(lombok.NonNull) lombok.val(lombok.val) Set(java.util.Set) EqualsAndHashCode(lombok.EqualsAndHashCode) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) List(java.util.List) JsonTypeInfo(com.fasterxml.jackson.annotation.JsonTypeInfo) Map(java.util.Map) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore) PrincipalAttributesCoreProperties(org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesCoreProperties) URI(java.net.URI) CoreAuthenticationUtils(org.apereo.cas.authentication.CoreAuthenticationUtils) LinkedHashSet(java.util.LinkedHashSet) JsonIgnoreProperties(com.fasterxml.jackson.annotation.JsonIgnoreProperties) NoArgsConstructor(lombok.NoArgsConstructor) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 77 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.

the class UmaResourceRegistrationRequest method asResourceSet.

/**
 * As resource set.
 *
 * @param profileResult the profile result
 * @return the resource set
 */
@JsonIgnore
public ResourceSet asResourceSet(final UserProfile profileResult) {
    val resourceSet = new ResourceSet();
    resourceSet.setIconUri(getIconUri());
    resourceSet.setId(getId());
    resourceSet.setName(getName());
    resourceSet.setScopes(new HashSet<>(getScopes()));
    resourceSet.setUri(getUri());
    resourceSet.setType(getType());
    resourceSet.setOwner(profileResult.getId());
    resourceSet.setClientId(OAuth20Utils.getClientIdFromAuthenticatedProfile(profileResult));
    return resourceSet;
}
Also used : lombok.val(lombok.val) ResourceSet(org.apereo.cas.uma.ticket.resource.ResourceSet) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 78 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project XRTB by benmfaul.

the class Node method getLucene.

@JsonIgnore
public String getLucene() {
    String stuff = "";
    if (value.toString().startsWith("@") == true)
        return null;
    String hr = this.hierarchy.replace("imp.0.", "imp.");
    hr = hr.replaceAll("exchange", "ext.exchange");
    if (this.notPresentOk == true) {
        stuff = "((-_exists_: " + hr + ") OR ";
    }
    String strValue = value.toString();
    strValue = strValue.replaceAll("/", "\\\\/");
    switch(operator) {
        case QUERY:
            return null;
        case EQUALS:
            stuff += hr + ": " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case NOT_EQUALS:
            stuff += "-" + hr + ": " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case STRINGIN:
            stuff += hr + ": \"" + strValue + "\"";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case NOT_STRINGIN:
            stuff += "-" + hr + ": \"" + strValue + "\"";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case NOT_INTERSECTS:
            if (value instanceof List) {
                String str = "(";
                List list = (List) value;
                for (int i = 0; i < list.size(); i++) {
                    str += "-" + hr + ": *" + list.get(i) + "*";
                    str = str.replaceAll("/", "\\\\/");
                    if (i + 1 < list.size()) {
                        str += " OR ";
                    }
                }
                str += ")";
                stuff += str;
                if (notPresentOk)
                    stuff += ")";
                return stuff;
            }
            stuff += "-" + hr + ": " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case INTERSECTS:
            if (value instanceof List) {
                String str = "(";
                List list = (List) value;
                for (int i = 0; i < list.size(); i++) {
                    str += hr + ": *" + list.get(i) + "*";
                    str = str.replaceAll("/", "\\\\/");
                    if (i + 1 < list.size()) {
                        str += " OR ";
                    }
                }
                str += ")";
                stuff += str;
                if (notPresentOk)
                    stuff += ")";
                return stuff;
            }
            stuff += hr + ": *" + strValue + "*";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case MEMBER:
            if (value instanceof List) {
                String str = "(";
                List list = (List) value;
                for (int i = 0; i < list.size(); i++) {
                    str += hr + ": *" + list.get(i) + "*";
                    str = str.replaceAll("/", "\\\\/");
                    if (i + 1 < list.size()) {
                        str += " OR ";
                    }
                }
                str += ")";
                stuff += str;
                if (notPresentOk)
                    stuff += ")";
                return stuff;
            }
            stuff += hr + ": *" + strValue + "*";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case NOT_MEMBER:
            if (value instanceof List) {
                String str = "(";
                List list = (List) value;
                for (int i = 0; i < list.size(); i++) {
                    str += "-" + hr + ": *" + list.get(i) + "*";
                    str = str.replaceAll("/", "\\\\/");
                    if (i + 1 < list.size()) {
                        str += " OR ";
                    }
                }
                str += ")";
                stuff += str;
                if (notPresentOk)
                    stuff += ")";
                return stuff;
            }
            stuff += "-" + hr + ": *" + strValue + "*";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case INRANGE:
            List o = (List) value;
            stuff += hr + ": [" + o.get(0) + " TO " + o.get(1) + "]";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case NOT_INRANGE:
            List list = (List) value;
            stuff += "-" + hr + ": [" + list.get(0) + " TO " + list.get(1) + "]";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case DOMAIN:
            list = (List) value;
            stuff += "(" + hr + "< " + list.get(1) + " AND " + hr + "> " + list.get(0) + ")";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case NOT_DOMAIN:
            list = (List) value;
            stuff += "(" + hr + "> " + list.get(1) + " OR " + hr + "< " + list.get(0) + ")";
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case LESS_THAN:
            stuff += hr + "< " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case LESS_THAN_EQUALS:
            stuff += hr + "<= " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case GREATER_THAN:
            stuff = hr + "< " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case GREATER_THAN_EQUALS:
            stuff += hr + ">= " + strValue;
            if (notPresentOk)
                stuff += ")";
            return stuff;
        case EXISTS:
            return "_exists_: " + hr;
        case NOT_EXISTS:
            return "_missing_: " + hr;
    }
    return "";
}
Also used : ArrayList(java.util.ArrayList) List(java.util.List) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 79 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project openstack4j by ContainX.

the class KeystoneToken method getAggregatedCatalog.

/**
 * {@inheritDoc}
 */
@Override
@JsonIgnore
public SortedSetMultimap<String, Service> getAggregatedCatalog() {
    if (aggregatedCatalog == null) {
        synchronized (this) {
            if (aggregatedCatalog == null) {
                aggregatedCatalog = TreeMultimap.create();
                for (Service sc : catalog) {
                    String nameKey = TYPE_WITHOUT_VERSION.apply(sc.getName());
                    String typeKey = TYPE_WITHOUT_VERSION.apply(sc.getType());
                    aggregatedCatalog.put(nameKey, sc);
                    aggregatedCatalog.put(typeKey, sc);
                }
            }
        }
    }
    return aggregatedCatalog;
}
Also used : Service(org.openstack4j.model.identity.v3.Service) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 80 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project OpenRefine by OpenRefine.

the class Engine method getAllRows.

@JsonIgnore
public FilteredRows getAllRows() {
    return new FilteredRows() {

        @Override
        public void accept(Project project, RowVisitor visitor) {
            try {
                visitor.start(project);
                int c = project.rows.size();
                for (int rowIndex = 0; rowIndex < c; rowIndex++) {
                    Row row = project.rows.get(rowIndex);
                    if (visitor.visit(project, rowIndex, row)) {
                        break;
                    }
                }
            } finally {
                visitor.end(project);
            }
        }
    };
}
Also used : Project(com.google.refine.model.Project) Row(com.google.refine.model.Row) ConjunctiveFilteredRows(com.google.refine.browsing.util.ConjunctiveFilteredRows) FilteredRecordsAsFilteredRows(com.google.refine.browsing.util.FilteredRecordsAsFilteredRows) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Aggregations

JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)113 lombok.val (lombok.val)14 ArrayList (java.util.ArrayList)12 HashMap (java.util.HashMap)8 Map (java.util.Map)8 HashSet (java.util.HashSet)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 Date (java.util.Date)5 Field (com.hortonworks.registries.common.Schema.Field)4 Set (java.util.Set)4 Schema (com.hortonworks.registries.common.Schema)3 PrimaryKey (com.hortonworks.registries.storage.PrimaryKey)3 EntitlementException (com.sun.identity.entitlement.EntitlementException)3 PolicyException (com.sun.identity.policy.PolicyException)3 JsonArray (io.vertx.core.json.JsonArray)3 List (java.util.List)3 SequenceFile (ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile)2 TrustAndKeyProvider (com.codingchili.core.security.TrustAndKeyProvider)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2