Package us.carrclan.david.authc4j.mac.bindings

Examples of us.carrclan.david.authc4j.mac.bindings.CoreServicesLibrary


    GroupInformationCreator(UserInformationSource source) {
        this.source = source;
    }

    GroupInformation createGroupInformation(CSIdentityRef groupIdentity) {
        CoreServicesLibrary csLibrary = CoreServicesLibrary.INSTANCE;
        String shortName = StringUtils.toString(csLibrary.CSIdentityGetPosixName(groupIdentity));
        String longName = StringUtils.toString(csLibrary.CSIdentityGetFullName(groupIdentity));
        return new ImmutableGroupInformation(source, shortName, longName);
    }
View Full Code Here


        this.source = source;
        this.groupInformationCreator = groupInformationCreator;
    }

    UserInformation createUserInformation(CSIdentityRef userIdentity, List<CSIdentityRef> groupIdentities) {
        CoreServicesLibrary csLibrary = CoreServicesLibrary.INSTANCE;
        String shortName = StringUtils.toString(csLibrary.CSIdentityGetPosixName(userIdentity));
        String longName = StringUtils.toString(csLibrary.CSIdentityGetFullName(userIdentity));
        Set<GroupInformation> memberGroupInformation = createMemberGroupInformation(userIdentity, groupIdentities);
        return new ImmutableUserInformation(source, shortName, longName, memberGroupInformation);
    }
View Full Code Here

        return new ImmutableUserInformation(source, shortName, longName, memberGroupInformation);
    }

    private Set<GroupInformation> createMemberGroupInformation(
            CSIdentityRef userIdentity, List<CSIdentityRef> groupIdentities) {
        CoreServicesLibrary csLibrary = CoreServicesLibrary.INSTANCE;
        Set<GroupInformation> memberGroupInfo = new LinkedHashSet<>();
        for (CSIdentityRef groupIdentity : groupIdentities) {
            if (csLibrary.CSIdentityIsMemberOfGroup(userIdentity, groupIdentity)) {
                memberGroupInfo.add(groupInformationCreator.createGroupInformation(groupIdentity));
            }
        }
        return memberGroupInfo;
    }
View Full Code Here

TOP

Related Classes of us.carrclan.david.authc4j.mac.bindings.CoreServicesLibrary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.