def install_saml(self):
        if self.installSaml:
            # Put latest Saml templates
            identityWar = 'identity.war'
            distIdentityPath = '%s/%s' % (self.tomcatWebAppFolder, identityWar)

            tmpIdentityDir = '%s/tmp_identity' % self.distFolder

            self.logIt("Unpacking %s from %s..." % ('oxtrust-configuration.jar', identityWar))
            self.removeDirs(tmpIdentityDir)
            self.createDirs(tmpIdentityDir)

            identityConfFilePattern = 'WEB-INF/lib/oxtrust-configuration-%s.jar' % self.oxVersion

            self.run([self.jarCommand,
                      'xf',
                      distIdentityPath, identityConfFilePattern], tmpIdentityDir)

            self.logIt("Unpacking %s..." % 'oxtrust-configuration.jar')
            self.run([self.jarCommand,
                      'xf',
                      identityConfFilePattern], tmpIdentityDir)

            self.logIt("Preparing Saml templates...")
            self.removeDirs('%s/conf/shibboleth2' % self.tomcatHome)
            self.createDirs('%s/conf/shibboleth2' % self.tomcatHome)

            self.copyTree('%s/shibboleth2' % tmpIdentityDir, '%s/conf/shibboleth2' % self.tomcatHome)

            self.removeDirs(tmpIdentityDir)
            
            # Put files to /opt/idp
            idpWar = "idp.war"
            distIdpPath = '%s/%s' % (self.idpWarFolder, idpWar)

            tmpIdpDir = '%s/tmp_idp' % self.distFolder

            self.logIt("Unpacking %s..." % idpWar)
            self.removeDirs(tmpIdpDir)
            self.createDirs(tmpIdpDir)

            self.run([self.jarCommand,
                      'xf',
                      distIdpPath], tmpIdpDir)

            self.logIt("Copying files to %s..." % self.idpLibFolder)
            self.copyTree('%s/WEB-INF/lib' % tmpIdpDir, self.idpLibFolder)
            self.copyFile("%s/static/idp/lib/jsp-api-2.1.jar" % self.install_dir, self.idpLibFolder)
            self.copyFile("%s/static/idp/lib/servlet-api-2.5.jar" % self.install_dir, self.idpLibFolder)

            self.removeDirs(tmpIdpDir)
dataset/ETHPy150Open GluuFederation/community-edition-setup/setup.py/Setup.install_saml/original