Package org.glite.authz.pap.papmanagement

Examples of org.glite.authz.pap.papmanagement.PapManager


            return;
        }

        log.debug(String.format("Storing policies for PAP %s (id=%s)", pap.getAlias(), pap.getId()));

        PapManager papManager = PapManager.getInstance();
        PapContainer papContainer = papManager.getPapContainer(pap.getAlias());

        synchronized (storePoliciesLock) {

            papContainer.deleteAllPolicies();
            papContainer.deleteAllPolicySets();
View Full Code Here


        c.getTimeInMillis());

    PAPConfiguration.instance().setMonitoringProperty(
        MonitoredProperties.SERVICE_STARTUP_TIME_PROP_NAME, dt);

    PapManager papManager = PapManager.getInstance();

    // Property: number of local policies
    int numberOfLocalPolicies = 0;
    for (PapContainer papContainer : PapContainer.getContainers(papManager
        .getLocalPaps())) {
      numberOfLocalPolicies += papContainer.getNumberOfPolicies();
    }
    PAPConfiguration.instance().setMonitoringProperty(
        MonitoredProperties.NUM_OF_LOCAL_POLICIES_PROP_NAME,
        numberOfLocalPolicies);

    // Property: number of remote policies
    int numOfRemotePolicies = 0;
    for (PapContainer papContainer : PapContainer.getContainers(papManager
        .getRemotePaps())) {
      numOfRemotePolicies += papContainer.getNumberOfPolicies();
    }
    PAPConfiguration.instance().setMonitoringProperty(
        MonitoredProperties.NUM_OF_REMOTE_POLICIES_PROP_NAME,
        numOfRemotePolicies);

    // Property: number of policies
    PAPConfiguration.instance().setMonitoringProperty(
        MonitoredProperties.NUM_OF_POLICIES_PROP_NAME,
        numberOfLocalPolicies + numOfRemotePolicies);

    // Property: policy last modification time
   
    String policyLastModificationTimeString = papManager.getPap(
        Pap.DEFAULT_PAP_ALIAS)
        .getPolicyLastModificationTimeInMilliseconds();
   
    DateTime policyLastModificationTime = new DateTime(Long.parseLong(policyLastModificationTimeString))
      .withChronology(ISOChronology.getInstanceUTC());
View Full Code Here

    }

    @Override
    protected Boolean doExecute() {

        PapManager papManager = PapManager.getInstance();

        Pap pap;

        try {
            pap = papManager.getPap(papAlias);

        } catch (NotFoundException e) {
            log.error("Unable to refresh cache, PAP not found: " + papAlias);
            return false;
        }
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.papmanagement.PapManager

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.