text:
package at.ac.tuwien.kr.alpha.grounder;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import org.junit.jupiter.api.Test;

import at.ac.tuwien.kr.alpha.api.Alpha;
import at.ac.tuwien.kr.alpha.common.atoms.Literal;
import at.ac.tuwien.kr.alpha.common.program.InternalProgram;
import at.ac.tuwien.kr.alpha.common.rule.InternalRule;
import at.ac.tuwien.kr.alpha.grounder.parser.ProgramPartParser;

/**
 * Copyright (c) 2017-2019, the Alpha Team.
 */
public class RuleGroundingOrderTest {

	private static final ProgramPartParser PROGRAM_PART_PARSER = new ProgramPartParser();

	@Test
	public void groundingOrder() {
		String aspStr = "h(X,C) :- p(X,Y), q(A,B), r(Y,A), s(C)." +
				"j(A,B,X,Y) :- r1(A,B), r1(X,Y), r1(A,X), r1(B,Y), A = B." +
				"p(a) :- b = a.";
		Alpha system = new Alpha();
		system.getConfig().setEvaluateStratifiedPart(false);
		InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
		InternalRule rule0 = internalPrg.getRules().get(0);
		RuleGroundingOrders rgo0 = new RuleGroundingOrders(rule0);
		rgo0.computeGroundingOrders();
		assertEquals(4, rgo0.getStartingLiterals().size());

		InternalRule rule1 = internalPrg.getRules().get(1);
		RuleGroundingOrders rgo1 = new RuleGroundingOrders(rule1);
		rgo1.computeGroundingOrders();
		assertEquals(4, rgo1.getStartingLiterals().size());

		InternalRule rule2 = internalPrg.getRules().get(2);
		RuleGroundingOrders rgo2 = new RuleGroundingOrders(rule2);
		rgo2.computeGroundingOrders();
		assertTrue(rgo2.fixedInstantiation());
	}

	@Test
	public void groundingOrderUnsafe() {
		assertThrows(RuntimeException.class, () -> {
			String aspStr = "h(X,C) :- X = Y, Y = C .. 3, C = X.";
			Alpha system = new Alpha();
			system.getConfig().setEvaluateStratifiedPart(false);
			InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
			computeGroundingOrdersForRule(internalPrg, 0);
		});
	}

	@Test
	public void testPositionFromWhichAllVarsAreBound_ground() {
		String aspStr = "a :- b, not c.";
		Alpha system = new Alpha();
		system.getConfig().setEvaluateStratifiedPart(false);
		InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
		RuleGroundingOrders rgo0 = computeGroundingOrdersForRule(internalPrg, 0);
		assertEquals(0, rgo0.getFixedGroundingOrder().getPositionFromWhichAllVarsAreBound());
	}

	@Test
	public void testPositionFromWhichAllVarsAreBound_simpleNonGround() {
		String aspStr = "a(X) :- b(X), not c(X).";
		Alpha system = new Alpha();
		system.getConfig().setEvaluateStratifiedPart(false);
		InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
		RuleGroundingOrders rgo0 = computeGroundingOrdersForRule(internalPrg, 0);
		assertEquals(1, rgo0.getStartingLiterals().size());
		for (Literal startingLiteral : rgo0.getStartingLiterals()) {
			assertEquals(0, rgo0.orderStartingFrom(startingLiteral).getPositionFromWhichAllVarsAreBound());
		}
	}

	@Test
	public void testPositionFromWhichAllVarsAreBound_longerSimpleNonGround() {
		String aspStr = "a(X) :- b(X), c(X), d(X), not e(X).";
		Alpha system = new Alpha();
		system.getConfig().setEvaluateStratifiedPart(false);
		InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
		RuleGroundingOrders rgo0 = computeGroundingOrdersForRule(internalPrg, 0);
		assertEquals(3, rgo0.getStartingLiterals().size());
		for (Literal startingLiteral : rgo0.getStartingLiterals()) {
			assertEquals(0, rgo0.orderStartingFrom(startingLiteral).getPositionFromWhichAllVarsAreBound());
		}
	}

	@Test
	public void testToString_longerSimpleNonGround() {
		String aspStr = "a(X) :- b(X), c(X), d(X), not e(X).";
		Alpha system = new Alpha();
		system.getConfig().setEvaluateStratifiedPart(false);
		InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
		RuleGroundingOrders rgo0 = computeGroundingOrdersForRule(internalPrg, 0);
		assertEquals(3, rgo0.getStartingLiterals().size());
		for (Literal startingLiteral : rgo0.getStartingLiterals()) {
			switch (startingLiteral.getPredicate().getName()) {
				case "b": assertEquals("b(X) : | c(X), d(X), not e(X)", rgo0.orderStartingFrom(startingLiteral).toString()); break;
				case "c": assertEquals("c(X) : | b(X), d(X), not e(X)", rgo0.orderStartingFrom(startingLiteral).toString()); break;
				case "d": assertEquals("d(X) : | b(X), c(X), not e(X)", rgo0.orderStartingFrom(startingLiteral).toString()); break;
				default: fail("Unexpected starting literal: " + startingLiteral);
			}
		}
	}

	@Test
	public void testPositionFromWhichAllVarsAreBound_joinedNonGround() {
		String aspStr = "a(X) :- b(X), c(X,Y), d(X,Z), not e(X).";
		Alpha system = new Alpha();
		system.getConfig().setEvaluateStratifiedPart(false);
		InternalProgram internalPrg = InternalProgram.fromNormalProgram(system.normalizeProgram(system.readProgramString(aspStr)));
		RuleGroundingOrders rgo0 = computeGroundingOrdersForRule(internalPrg, 0);
final Literal litBX = PROGRAM_PART_PARSER.parseLiteral("b(X)");
		final Literal litCXY = PROGRAM_PART_PARSER.parseLiteral("c(X,Y)");
		final Literal litDXZ = PROGRAM_PART_PARSER.parseLiteral("d(X,Z)");
		assertTrue(2 <= rgo0.orderStartingFrom(litBX).getPositionFromWhichAllVarsAreBound());
		assertTrue(1 <= rgo0.orderStartingFrom(litCXY).getPositionFromWhichAllVarsAreBound());
		assertTrue(1 <= rgo0.orderStartingFrom(litDXZ).getPositionFromWhichAllVarsAreBound());
	}

	private RuleGroundingOrders computeGroundingOrdersForRule(InternalProgram program, int ruleIndex) {
		InternalRule rule = program.getRules().get(ruleIndex);
		RuleGroundingOrders rgo = new RuleGroundingOrders(rule);
		rgo.computeGroundingOrders();
		return rgo;
	}

}


text:
package polyite.export

import scala.util.parsing.json.JSON
import scala.io.Source
import isl.Conversions._
import collection.mutable.HashMap
import java.io.PrintWriter
import java.io.File
import java.io.IOException
import isl.Isl.TypeAliases._
import java.util.logging.Logger
import java.util.logging.Level
import isl.Isl
import polyite.ScopInfo
import scala.BigDecimal
import scala.Range

object JSCOPInterface {

  private val jsonIndentWidth : Int = 4
  private val myLogger : Logger = Logger.getLogger("")

  def readJSCOP(fileName : String) : Option[ScopInfo] = {

    if (fileName == null) {
      throw new NullPointerException
    }

    val jscopFile = new java.io.File(fileName)

    if (!(jscopFile.exists() && jscopFile.canRead())) {
      return None
    }

    val input : Source = Source.fromFile(fileName)
    val jscopStr : String = try input.mkString finally input.close()
    return parseJSCOP(jscopStr)
  }

  def parseJSCOP(s : String) : Option[ScopInfo] = {
    parseJSON(s) match {
      case None => {
        myLogger.warning("Basic JSON parsing failed.")
        return None
      }
      case Some(parseTree) => {
        extractScop(parseTree) match {
          case None => return None
          case Some(scop) => {
            return Some(scop.setJSCOP(parseTree))
          }
        }
      }
    }
  }

  private def parseJSON(s : String) : Option[Any] = {
    // Globally parse numerics to BigDecimal instead of double
    val myConversionFunc = { input : String => BigDecimal(input) }
    JSON.globalNumberParser = myConversionFunc
    return JSON.parseFull(s)
  }

  private def extractScop(parseTree : Any) : Option[ScopInfo] = {

    if (!parseTree.isInstanceOf[Map[_, Any]])
      return None
    val jsonMap : Map[String, Any] = parseTree.asInstanceOf[Map[String, Any]]
    if (!jsonMap.contains("statements")) {
      myLogger.warning("Couldn't find property \"statements\".")
      return None
    }
    var jsonVal : Any = jsonMap("statements")
    if (!jsonVal.isInstanceOf[List[Any]]) {
      myLogger.warning("Value of \"statements\" is not a list.")
      return None
    }
    val jsonStatementsList : List[Any] = jsonVal.asInstanceOf[List[Any]]
    var scop : ScopInfo = new ScopInfo

    for (childNode <- jsonStatementsList) {

      if (!childNode.isInstanceOf[Map[_, Any]]) {
        myLogger.warning("An element of the \"statements\" list is not a map.")
        return None
      }

      val jsonStatementMap = childNode.asInstanceOf[Map[String, Any]]
      if (!List("accesses", "domain", "schedule", "name")
        .forall(jsonStatementMap.contains)) {
        myLogger.warning("Statement doesn't have the right properties.")
        return None
      }

      jsonVal = jsonStatementMap("domain")
      if (!jsonVal.isInstanceOf[String]) {
        myLogger.warning("Value of \"domain\" is not a string.")
        return None
      }
      scop = scop.addDomain(isl.Set.readFromStr(Isl.ctx, jsonVal.asInstanceOf[String]))

      jsonVal = jsonStatementMap("schedule")
      if (!jsonVal.isInstanceOf[String]) {
        myLogger.warning("Value of \"schedule\" is not a string.")
        return None
      }
      scop = scop.addSchedule(isl.Map.readFromStr(
        Isl.ctx, jsonVal.asInstanceOf[String]))

      jsonVal = jsonStatementMap("accesses")
      if (!jsonVal.isInstanceOf[List[Any]]) {
        myLogger.warning("Value of \"accesses\" is not a list.")
        return None
      }
      val jsonAccessesList = jsonVal.asInstanceOf[List[Any]]

      for (jsonVal <- jsonAccessesList) {
        if (!jsonVal.isInstanceOf[Map[_, Any]])
          return None
        var jsonAccessesMap = jsonVal.asInstanceOf[Map[String, Any]]
        if (!List("kind", "relation").forall(jsonAccessesMap.contains)) {
          myLogger.warning("access object does not have the right properties.")
          return None
        }
        val kind = jsonAccessesMap("kind")
        val relation = jsonAccessesMap("relation")
        kind.toString() match {
          case "read" =>
            scop = scop.addRds(isl.Map.readFromStr(Isl.ctx, relation.toString()))
          case "write" =>
            scop = scop.addWrs(isl.Map.readFromStr(Isl.ctx, relation.toString()))
        }
      }
    }

    if (!jsonMap.contains("context")) {
      myLogger.warning("Couldn't find property \"context\".")
      return None
    }
    jsonVal = jsonMap("context")
    if (!jsonVal.isInstanceOf[String]) {
      myLogger.warning("Value of \"context\" is not a string.")
      return None
    }
    scop = scop.setParams(isl.UnionSet.readFromStr(Isl.ctx, jsonVal.toString()))

    Some(scop)
  }

  def genExtJSCOP(scop : ScopInfo, newSched : isl.UnionMap,
    schedTree : isl.Schedule, doubleQuoteStringsInSchedTree : Boolean) : String = {
    return JSONExporter.generate(replaceSchedExt(scop, newSched, schedTree,
      doubleQuoteStringsInSchedTree), jsonIndentWidth) + '\n'
  }

  def replaceSchedExt(scop : ScopInfo, newSched : isl.UnionMap,
    schedTree : isl.Schedule, doubleQuoteStringsInSchedTree : Boolean) : Map[String, Any] = {
    var scopMap : Map[String, Any] = replaceSched(scop, newSched)
    var schedTreeStr : String = schedTree.toString()
    // make the serialized schedule tree valid JSON: we must surround the keys
    // with quotation marks.
    if (doubleQuoteStringsInSchedTree)
      schedTreeStr = schedTreeStr.replaceAll("\"", "\\\\\\\\\"")
    else
      schedTreeStr = schedTreeStr.replaceAll("\"", "\\\\\"")
    return scopMap + (("schedTree", schedTreeStr))
  }

  def replaceSched(scop : ScopInfo, newSched : isl.UnionMap) : Map[String, Any] = {
    val stmt2Sched : collection.mutable.Map[String, isl.Map] = new HashMap[String, isl.Map]();
    newSched.foreachMap(((m : isl.Map) => stmt2Sched.put(m.getTupleId(isl.DimType.In).toString(), m)))

    def rejectJSCOP() {
      throw new IllegalArgumentException("scop.getJscop does not have the expected format.")
    }

    // insert the new statement schedules into the JSCOP AST
    if (!scop.getJscop.isInstanceOf[Map[_, Any]])
      rejectJSCOP()
    var scopMap = scop.getJscop.asInstanceOf[Map[String, Any]]
    if (!scopMap.contains("statements"))
      rejectJSCOP()
    var jsonVal = scopMap("statements")
    if (!jsonVal.isInstanceOf[List[Any]])
      rejectJSCOP()
    var stmtList : List[Any] = jsonVal.asInstanceOf[List[Any]]
    stmtList = stmtList.map { (elem : Any) =>
      {
        if (!elem.isInstanceOf[Map[_, Any]])
          rejectJSCOP()
        var stmtMap : Map[String, Any] = elem.asInstanceOf[Map[String, Any]]
        if (!stmtMap.contains("name"))
          rejectJSCOP()
        val stmtName : String = stmtMap("name").toString
        val newStmtSched : String = stmt2Sched(stmtName).toString()
        stmtMap + (("schedule", newStmtSched))
      }
    }
    scopMap += (("statements", stmtList))
    return scopMap
  }

  def genJSCOP(scop : ScopInfo, newSched : isl.UnionMap) : String = {
    val scopMap : Any = replaceSched(scop, newSched)
    return JSONExporter.generate(scopMap, jsonIndentWidth) + '\n'
  }

  def exportSchedule(jscopFile : File, scop : ScopInfo, newSched : isl.UnionMap) {
    val json : String = genJSCOP(scop, newSched)
    writeFile(json, jscopFile)
  }

  private def writeFile(content : String, dest : File) {
    if (!dest.canWrite() && !dest.getAbsoluteFile.getParentFile.canWrite()) {
      throw new IllegalArgumentException("Cannot write to " + dest.getPath)
    }

    var writer : PrintWriter = null
    try {
      writer = new PrintWriter(dest)
      writer.write(content)
      writer.flush()
    } finally {
      if (writer != null)
        try {
          writer.close()
        } catch {
          case e : IOException => {
            myLogger.log(Level.SEVERE,
              "Failed to close writer.", e)
          }
        }
    }
  }

  def exportScheduleExt(jscopFile : File, scop : ScopInfo,
    newSched : isl.UnionMap, schedTree : isl.Schedule) {
    val json = genExtJSCOP(scop, newSched, schedTree, false)
    writeFile(json, jscopFile)
  }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>

<rights>

<include file="zimbra-rights.xml"/>
<include file="zimbra-rights-roles.xml"/>
<include file="adminconsole-ui.xml"/>

<right name="setAdminConsoleAccountsInfoTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for accounts contact tab </desc>
  <ui name="Manage-Accounts-Account-GeneralInfo(modify)"/>
  <attrs>

  </attrs>
</right>

<right name="viewAdminConsoleAccountsInfoTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for accounts contact tab </desc>
  <ui name="Manage-Accounts-Account-GeneralInfo(view)"/>
  <attrs>

  </attrs>
</right>

<right name="adminConsoleAccountsInfoTabRights" type="combo">
  <desc> Admin Console rights for Accounts Info Tab </desc>
  <ui name="Manage-Accounts-Account-GeneralInfo"/>
  <rights>
    <r n="setAdminConsoleAccountsInfoTab"/>
    <r n="viewAdminConsoleAccountsInfoTab"/>
    <r n="getAccountInfo"/>
    <r n="createAccount"/>
    <r n="deleteAccount"/>
    <r n="renameAccount"/>
    <r n="setAccountPassword"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsContactTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for accounts contact tab </desc>
  <ui name="Manage-Accounts-Account-ContactInfo(modify)"/>
  <attrs>

  </attrs>
</right>

<right name="viewAdminConsoleAccountsContactTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for accounts contact tab </desc>
  <ui name="Manage-Accounts-Account-ContactInfo(view)"/>
  <attrs>

  </attrs>
</right>

<right name="adminConsoleAccountsContactTabRights" type="combo">
  <desc> Admin Console rights for Accounts Contact Tab </desc>
  <ui name="Manage-Accounts-Account-ContactInfo"/>
  <rights>
    <r n="setAdminConsoleAccountsContactTab"/>
    <r n="viewAdminConsoleAccountsContactTab"/>
  </rights>
</right>

<right name="adminConsoleAccountsMemberOfTabRights" type="combo">
  <desc> Admin Console rights for Accounts MemberOf Tab </desc>
  <ui name="Manage-Accounts-Account-MemberOf"/>
  <rights>
    <r n="getAccountMembership"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsAliasesTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts Aliases Tab </desc>
  <ui name="Manage-Accounts-Account-Aliases(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsAliasesTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts Aliases Tab </desc>
  <ui name="Manage-Accounts-Account-Aliases(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsAliasesTabRights" type="combo">
  <desc> Admin Console rights for Accounts Aliases Tab </desc>
  <ui name="Manage-Accounts-Account-Aliases"/>
  <rights>
    <r n="setAdminConsoleAccountsAliasesTab"/>
    <r n="viewAdminConsoleAccountsAliasesTab"/>
    <r n="createAlias"/>
    <r n="deleteAlias"/>
    <r n="addAccountAlias"/>
    <r n="removeAccountAlias"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsFeaturesTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts Features Tab </desc>
  <ui name="Manage-Accounts-Account-Features(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsFeaturesTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts Features Tab </desc>
  <ui name="Manage-Accounts-Account-Features(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsFeaturesTabRights" type="combo">
  <desc> Admin Console rights for Accounts Features Tab </desc>
  <ui name="Manage-Accounts-Account-Features"/>
  <rights>
    <r n="setAdminConsoleAccountsFeaturesTab"/>
    <r n="viewAdminConsoleAccountsFeaturesTab"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsForwardingTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts Forwarding Tab </desc>
  <ui name="Manage-Accounts-Account-Forwarding(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsForwardingTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts Forwarding Tab </desc>
  <ui name="Manage-Accounts-Account-Forwarding(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsForwardingTabRights" type="combo">
  <desc> Admin Console rights for Accounts Forwarding Tab </desc>
  <ui name="Manage-Accounts-Account-Forwarding"/>
  <rights>
    <r n="setAdminConsoleAccountsForwardingTab"/>
    <r n="viewAdminConsoleAccountsForwardingTab"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsPreferencesTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts Preferences Tab </desc>
  <ui name="Manage-Accounts-Account-Preferences(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsPreferencesTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts Preferences Tab </desc>
  <ui name="Manage-Accounts-Account-Preferences(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsPreferencesTabRights" type="combo">
  <desc> Admin Console rights for Accounts Preferences Tab </desc>
  <ui name="Manage-Accounts-Account-Preferences"/>
  <rights>
    <r n="setAdminConsoleAccountsPreferencesTab"/>
    <r n="viewAdminConsoleAccountsPreferencesTab"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsFreeBusyInteropTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts FreeBusyInterop Tab </desc>
  <ui name="Manage-Accounts-Account-FreeBusyInterop(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsFreeBusyInteropTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts FreeBusyInterop Tab </desc>
  <ui name="Manage-Accounts-Account-FreeBusyInterop(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsFreeBusyInteropTabRights" type="combo">
  <desc> Admin Console rights for Accounts FreeBusyInterop Tab </desc>
  <ui name="Manage-Accounts-Account-FreeBusyInterop"/>
  <rights>
    <r n="setAdminConsoleAccountsFreeBusyInteropTab"/>
    <r n="viewAdminConsoleAccountsFreeBusyInteropTab"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsThemesTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts Themes Tab </desc>
  <ui name="Manage-Accounts-Account-Themes(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsThemesTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts Themes Tab </desc>
  <ui name="Manage-Accounts-Account-Themes(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsThemesTabRights" type="combo">
  <desc> Admin Console rights for Accounts Themes Tab </desc>
  <ui name="Manage-Accounts-Account-Themes"/>
  <rights>
    <r n="setAdminConsoleAccountsThemesTab"/>
    <r n="viewAdminConsoleAccountsThemesTab"/>
  </rights>
</right>

<right name="setAdminConsoleAccountsZimletsTab" type="setAttrs" targetType="account">
  <desc> Admin Console set attr rights for Accounts Zimlets Tab </desc>
  <ui name="Manage-Accounts-Account-Zimlets(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleAccountsZimletsTab" type="getAttrs" targetType="account">
  <desc> Admin Console view attr rights for Accounts Zimlets Tab </desc>
  <ui name="Manage-Accounts-Account-Zimlets(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleAccountsZimletsTabRights" type="combo">
  <desc> Admin Console rights for Accounts Zimlets Tab </desc>
  <ui name="Manage-Accounts-Account-Zimlets"/>
  <rights>
    <r n="setAdminConsoleAccountsZimletsTab"/>
    <r n="viewAdminConsoleAccountsZimletsTab"/>
  </rights>
</right>

  <right name="setAdminConsoleAccountsACLTab" type="setAttrs" targetType="account">
    <desc> Admin Console set attr rights for Account ACL Tab </desc>
    <ui name="Manage-Accounts-Account-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleAccountsACLTab" type="getAttrs" targetType="account">
    <desc> Admin Console view attr rights for Account ACL Tab </desc>
    <ui name="Manage-Accounts-Account-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleAccountsACLTabRights" type="combo">
    <desc> Admin Console rights for Account ACL Tab </desc>
    <ui name="Manage-Accounts-Account-ACL"/>
    <rights>
      <r n="setAdminConsoleAccountsACLTab"/>
      <r n="viewAdminConsoleAccountsACLTab"/>
    </rights>
  </right>

<right name="setAdminConsoleDLMembersTab" type="setAttrs" targetType="dl">
  <desc> Admin Console set attr rights for DL Members Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Members(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleDLMembersTab" type="getAttrs" targetType="dl">
  <desc> Admin Console view attr rights for DL Members Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Members(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleDLMembersTabRights" type="combo">
  <desc> Admin Console rights for DL Members Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Members"/>
  <rights>
    <r n="setAdminConsoleDLMembersTab"/>
    <r n="viewAdminConsoleDLMembersTab"/>
    <r n="renameDistributionList"/>
    <r n="createDistributionList"/>
    <r n="deleteDistributionList"/>
    <r n="addDistributionListMember"/>
    <r n="removeDistributionListMember"/>
    <r n="addDistributionListAlias"/>
    <r n="removeDistributionListAlias"/>
  </rights>
</right>

<right name="setAdminConsoleDLNotesTab" type="setAttrs" targetType="dl">
  <desc> Admin Console set attr rights for DL Notes Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Notes(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleDLNotesTab" type="getAttrs" targetType="dl">
  <desc> Admin Console view attr rights for DL Notes Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Notes(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleDLNotesTabRights" type="combo">
  <desc> Admin Console rights for DL Notes Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Notes"/>
  <rights>
    <r n="setAdminConsoleDLNotesTab"/>
    <r n="viewAdminConsoleDLNotesTab"/>
  </rights>
</right>

<right name="adminConsoleDLMemberOfTabRights" type="combo">
  <desc> Admin Console rights for DL MemberOf Tab </desc>
  <rights>
    <r n="getDistributionListMembership"/>
  </rights>
</right>

<right name="setAdminConsoleDLAliasesTab" type="setAttrs" targetType="dl">
  <desc> Admin Console set attr rights for DL Aliases Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Aliases(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleDLAliasesTab" type="getAttrs" targetType="dl">
  <desc> Admin Console view attr rights for DL Aliases Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Aliases(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleDLAliasesTabRights" type="combo">
  <desc> Admin Console rights for DL Aliases Tab </desc>
  <ui name="Manage-DistributionLists-DistributionList-Aliases"/>
  <rights>
    <r n="setAdminConsoleDLAliasesTab"/>
    <r n="viewAdminConsoleDLAliasesTab"/>
    <r n="createAlias"/>
    <r n="deleteAlias"/>
    <r n="addDistributionListAlias"/>
    <r n="removeDistributionListAlias"/>
  </rights>
</right>

<right name="setAdminConsoleDLSharesTab" type="setAttrs" targetType="dl">
  <desc> Admin Console set attr rights for DL Shares Tab </desc>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleDLSharesTab" type="getAttrs" targetType="dl">
  <desc> Admin Console view attr rights for DL Shares Tab </desc>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleDLSharesTabRights" type="combo">
  <desc> Admin Console rights for DL Shares Tab </desc>
  <rights>
    <r n="setAdminConsoleDLSharesTab"/>
    <r n="viewAdminConsoleDLSharesTab"/>
  </rights>
</right>

  <right name="setAdminConsoleDLACLTab" type="setAttrs" targetType="dl">
    <desc> Admin Console set attr rights for DL ACL Tab </desc>
    <ui name="Manage-DistributionLists-DistributionList-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDLACLTab" type="getAttrs" targetType="dl">
    <desc> Admin Console view attr rights for DL ACL Tab </desc>
    <ui name="Manage-DistributionLists-DistributionList-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDLACLTabRights" type="combo">
    <desc> Admin Console rights for DL ACL Tab </desc>
    <ui name="Manage-DistributionLists-DistributionList-ACL"/>
    <rights>
      <r n="setAdminConsoleDLACLTab"/>
      <r n="viewAdminConsoleDLACLTab"/>
    </rights>
  </right>

<right name="setAdminConsoleResourcesPropertiesTab" type="setAttrs" targetType="calresource">
  <desc> Admin Console set attr rights for Resources Properties Tab </desc>
  <ui name="Manage-Resources-Resource-Properties(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleResourcesPropertiesTab" type="getAttrs" targetType="calresource">
  <desc> Admin Console view attr rights for Resources Properties Tab </desc>
  <ui name="Manage-Resources-Resource-Properties(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleResourcesPropertiesTabRights" type="combo">
  <desc> Admin Console rights for Resources Properties Tab </desc>
  <ui name="Manage-Resources-Resource-Properties"/>
  <rights>
    <r n="setAdminConsoleResourcesPropertiesTab"/>
    <r n="viewAdminConsoleResourcesPropertiesTab"/>
    <r n="addCalendarResourceAlias"/>
    <r n="removeCalendarResourceAlias"/>
    <r n="getCalendarResourceInfo"/>
    <r n="createCalendarResource"/>
    <r n="renameCalendarResource"/>
    <r n="deleteCalendarResource"/>
    <r n="setCalendarResourcePassword"/>
  </rights>
</right>

<right name="setAdminConsoleResourcesContactTab" type="setAttrs" targetType="calresource">
  <desc> Admin Console set attr rights for Resources Contact Tab </desc>
  <ui name="Manage-Resources-Resource-LocationAndContactInfo(modify)"/>
  <attrs>

  </attrs>
</right>
<right name="viewAdminConsoleResourcesContactTab" type="getAttrs" targetType="calresource">
  <desc> Console view attr rights for Resources Contact Tab </desc>
  <ui name="Manage-Resources-Resource-LocationAndContactInfo(view)"/>
  <attrs>

  </attrs>
</right>
<right name="adminConsoleResourcesContactTabRights" type="combo">
  <desc> Admin Console rights for Resources Contact Tab </desc>
  <ui name="Manage-Resources-Resource-LocationAndContactInfo"/>
  <rights>
    <r n="setAdminConsoleResourcesContactTab"/>
    <r n="viewAdminConsoleResourcesContactTab"/>
  </rights>
</right>

  <right name="viewAdminConsoleCOSInfoTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS General Info Tab </desc>
    <ui name="Configure-COSes-COS-GeneralInfo(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="setAdminConsoleCOSInfoTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS General Info Tab </desc>
    <ui name="Configure-COSes-COS-GeneralInfo(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSInfoTabRights" type="combo">
    <desc> Admin Console rights for COS General Info Tab </desc>
    <ui name="Configure-COSes-COS-GeneralInfo"/>
    <rights>
      <r n="setAdminConsoleCOSInfoTab"/>
      <r n="viewAdminConsoleCOSInfoTab"/>
    </rights>
  </right>

  <right name="viewAdminConsoleCOSFeaturesTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS General Features Tab </desc>
    <ui name="Configure-COSes-COS-Features(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="setAdminConsoleCOSFeaturesTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS General Features Tab </desc>
    <ui name="Configure-COSes-COS-Features(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSFeaturesTabRights" type="combo">
    <desc> Admin Console rights for COS General Features Tab </desc>
    <ui name="Configure-COSes-COS-Features"/>
    <rights>
      <r n="setAdminConsoleCOSFeaturesTab"/>
      <r n="viewAdminConsoleCOSFeaturesTab"/>
    </rights>
  </right>

  <right name="viewAdminConsoleCOSPreferencesTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS General Preferences Tab </desc>
    <ui name="Configure-COSes-COS-Preferences(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="setAdminConsoleCOSPreferencesTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS General Preferences Tab </desc>
    <ui name="Configure-COSes-COS-Preferences(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSPreferencesTabRights" type="combo">
    <desc> Admin Console rights for COS General Preferences Tab </desc>
    <ui name="Configure-COSes-COS-Preferences"/>
    <rights>
      <r n="setAdminConsoleCOSPreferencesTab"/>
      <r n="viewAdminConsoleCOSPreferencesTab"/>
    </rights>
  </right>

  <right name="viewAdminConsoleCOSThemesTab" type="setAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS Themes Tab </desc>
    <ui name="Configure-COSes-COS-Themes(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="setAdminConsoleCOSThemesTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS Themes Tab </desc>
    <ui name="Configure-COSes-COS-Themes(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSThemesTabRights" type="combo">
    <desc> Admin Console rights for COS Themes Tab </desc>
    <ui name="Configure-COSes-COS-Themes"/>
    <rights>
      <r n="setAdminConsoleCOSThemesTab"/>
      <r n="viewAdminConsoleCOSThemesTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleCOSZimletsTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS Zimlets Tab </desc>
    <ui name="Configure-COSes-COS-Zimlets(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleCOSZimletsTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS Zimlets Tab </desc>
    <ui name="Configure-COSes-COS-Zimlets(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSZimletsTabRights" type="combo">
    <desc> Admin Console rights for COS Zimlets Tab </desc>
    <ui name="Configure-COSes-COS-Zimlets"/>
    <rights>
      <r n="setAdminConsoleCOSZimletsTab"/>
      <r n="viewAdminConsoleCOSZimletsTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleCOSServerPoolTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS Server Pool Tab </desc>
    <ui name="Configure-COSes-COS-ServerPool(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleCOSServerPoolTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS Server Pool Tab </desc>
    <ui name="Configure-COSes-COS-ServerPool(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSServerPoolTabRights" type="combo">
    <desc> Admin Console rights for COS Server Pool Tab </desc>
    <ui name="Configure-COSes-COS-ServerPool"/>
    <rights>
      <r n="setAdminConsoleCOSServerPoolTab"/>
      <r n="viewAdminConsoleCOSServerPoolTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleCOSAdvancedTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS Advanced Tab </desc>
    <ui name="Configure-COSes-COS-Advanced(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleCOSAdvancedTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS Advanced Tab </desc>
    <ui name="Configure-COSes-COS-Advanced(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSAdvancedTabRights" type="combo">
    <desc> Admin Console rights for COS Advanced Tab </desc>
    <ui name="Configure-COSes-COS-Advanced"/>
    <rights>
      <r n="setAdminConsoleCOSAdvancedTab"/>
      <r n="viewAdminConsoleCOSAdvancedTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleCOSACLTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS ACL Tab </desc>
    <ui name="Configure-COSes-COS-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleCOSACLTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS ACL Tab </desc>
    <ui name="Configure-COSes-COS-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSACLTabRights" type="combo">
    <desc> Admin Console rights for COS ACL Tab </desc>
    <ui name="Configure-COSes-COS-ACL"/>
    <rights>
      <r n="setAdminConsoleCOSACLTab"/>
      <r n="viewAdminConsoleCOSACLTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleCOSMobileTab" type="setAttrs" targetType="cos">
    <desc> Admin Console set attr rights for COS Mobile Tab </desc>
    <ui name="Configure-COSes-COS-MobileAccess(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleCOSMobileTab" type="getAttrs" targetType="cos">
    <desc> Admin Console view attr rights for COS Mobile Tab </desc>
    <ui name="Configure-COSes-COS-MobileAccess(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleCOSMobileTabRights" type="combo">
    <desc> Admin Console rights for COS Mobile Tab </desc>
    <ui name="Configure-COSes-COS-MobileAccess"/>
    <rights>
      <r n="setAdminConsoleCOSMobileTab"/>
      <r n="viewAdminConsoleCOSMobileTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainInfoTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Info Tab </desc>
    <ui name="Configure-Domains-Domain-GeneralInfo(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainInfoTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Info Tab </desc>
    <ui name="Configure-Domains-Domain-GeneralInfo(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainInfoTabRights" type="combo">
    <desc> Admin Console rights for Domain Info Tab </desc>
    <ui name="Configure-Domains-Domain-GeneralInfo"/>
    <rights>
      <r n="setAdminConsoleDomainInfoTab"/>
      <r n="viewAdminConsoleDomainInfoTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainGALTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain GAL Tab </desc>
    <ui name="Configure-Domains-Domain-GAL-configure(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainGALTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain GAL Tab </desc>
    <ui name="Configure-Domains-Domain-GAL-configure(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainGALTabRights" type="combo">
    <desc> Admin Console rights for Domain GAL Tab </desc>
    <ui name="Configure-Domains-Domain-GAL-configure"/>
    <rights>
      <r n="setAdminConsoleDomainGALTab"/>
      <r n="viewAdminConsoleDomainGALTab"/>
      <r n="configureExternalGAL"/>
    </rights>
  </right>

  <right name="adminConsoleCreateGALRights" type="setAttrs" targetType="account">
    <desc> Admin Console set attr rights for create GAL sync account </desc>
    <ui name="Configure-Domains-Domain-GAL"/>
	<attrs>

	</attrs>
  </right>

  <right name="adminConsoleConfigGALRights" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for configure GAL </desc>
    <ui name="Configure-Domains-Domain-GAL-configure(modify)"/>
	<attrs>

	</attrs>
  </right>

  <right name="setAdminConsoleDomainAuthenticationTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Authentication Tab </desc>
    <ui name="Configure-Domains-Domain-Authentication(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainAuthenticationTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Authentication Tab </desc>
    <ui name="Configure-Domains-Domain-Authentication(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainAuthenticationTabRights" type="combo">
    <desc> Admin Console rights for Domain Authentication Tab </desc>
    <ui name="Configure-Domains-Domain-Authentication"/>
    <rights>
      <r n="setAdminConsoleDomainAuthenticationTab"/>
      <r n="viewAdminConsoleDomainAuthenticationTab"/>
      <r n="configureExternalAuth"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainVirtualHostsTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain VirtualHosts Tab </desc>
    <ui name="Configure-Domains-Domain-VirtualHosts(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainVirtualHostsTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain VirtualHosts Tab </desc>
    <ui name="Configure-Domains-Domain-VirtualHosts(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainVirtualHostsTabRights" type="combo">
    <desc> Admin Console rights for Domain VirtualHosts Tab </desc>
    <ui name="Configure-Domains-Domain-VirtualHosts"/>
    <rights>
      <r n="setAdminConsoleDomainVirtualHostsTab"/>
      <r n="viewAdminConsoleDomainVirtualHostsTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainDocumentsTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Documents Tab </desc>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainDocumentsTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Documents Tab </desc>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainDocumentsTabRights" type="combo">
    <desc> Admin Console rights for Domain Documents Tab </desc>
    <rights>
      <r n="setAdminConsoleDomainDocumentsTab"/>
      <r n="viewAdminConsoleDomainDocumentsTab"/>
      <r n="configureWikiAccount"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainFreebusyTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Freebusy Tab </desc>
    <ui name="Configure-Domains-Domain-FreeBusyInterop(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainFreebusyTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Freebusy Tab </desc>
    <ui name="Configure-Domains-Domain-FreeBusyInterop(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainFreebusyTabRights" type="combo">
    <desc> Admin Console rights for Domain Freebusy Tab </desc>
    <ui name="Configure-Domains-Domain-FreeBusyInterop"/>
    <rights>
      <r n="setAdminConsoleDomainFreebusyTab"/>
      <r n="viewAdminConsoleDomainFreebusyTab"/>

    </rights>
  </right>

  <right name="setAdminConsoleDomainZimletsTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Zimlets Tab </desc>
    <ui name="Configure-Domains-Domain-Zimlets(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainZimletsTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Zimlets Tab </desc>
    <ui name="Configure-Domains-Domain-Zimlets(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainZimletsTabRights" type="combo">
    <desc> Admin Console rights for Domain Zimlets Tab </desc>
    <ui name="Configure-Domains-Domain-Zimlets"/>
    <rights>
      <r n="setAdminConsoleDomainZimletsTab"/>
      <r n="viewAdminConsoleDomainZimletsTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainThemesTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Themes Tab </desc>
    <ui name="Configure-Domains-Domain-Themes(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainThemesTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Themes Tab </desc>
    <ui name="Configure-Domains-Domain-Themes(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainThemesTabRights" type="combo">
    <desc> Admin Console rights for Domain Themes Tab </desc>
    <ui name="Configure-Domains-Domain-Themes"/>
    <rights>
      <r n="setAdminConsoleDomainThemesTab"/>
      <r n="viewAdminConsoleDomainThemesTab"/>

    </rights>
  </right>

  <right name="setAdminConsoleDomainLimitsTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain Limits Tab </desc>
    <ui name="Configure-Domains-Domain-AccountLimits(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainLimitsTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain Limits Tab </desc>
    <ui name="Configure-Domains-Domain-AccountLimits(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainLimitsTabRights" type="combo">
    <desc> Admin Console rights for Domain Limits Tab </desc>
    <ui name="Configure-Domains-Domain-AccountLimits"/>
    <rights>
      <r n="setAdminConsoleDomainLimitsTab"/>
      <r n="viewAdminConsoleDomainLimitsTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleDomainACLTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Domain ACL Tab </desc>
    <ui name="Configure-Domains-Domain-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleDomainACLTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Domain ACL Tab </desc>
    <ui name="Configure-Domains-Domain-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleDomainACLTabRights" type="combo">
    <desc> Admin Console rights for Domain ACL Tab </desc>
    <ui name="Configure-Domains-Domain-ACL"/>
    <rights>
      <r n="setAdminConsoleDomainACLTab"/>
      <r n="viewAdminConsoleDomainACLTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerInfoTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-GeneralInfo(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerInfoTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-GeneralInfo(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerInfoTabRights" type="combo">
    <desc> Admin Console rights for Server Info Tab </desc>
    <ui name="Configure-Servers-Server-GeneralInfo"/>
    <rights>
      <r n="setAdminConsoleServerInfoTab"/>
      <r n="viewAdminConsoleServerInfoTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerServicesTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-Services(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerServicesTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-Services(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerServicesTabRights" type="combo">
    <desc> Admin Console rights for Server Services Tab </desc>
    <ui name="Configure-Servers-Server-Services"/>
    <rights>
      <r n="setAdminConsoleServerServicesTab"/>
      <r n="viewAdminConsoleServerServicesTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerMTATab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-MTA(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerMTATab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-MTA(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerMTATabRights" type="combo">
    <desc> Admin Console rights for Server MTA Tab </desc>
    <ui name="Configure-Servers-Server-MTA"/>
    <rights>
      <r n="setAdminConsoleServerMTATab"/>
      <r n="viewAdminConsoleServerMTATab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerIMAPTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-IMAP(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerIMAPTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-IMAP(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerIMAPTabRights" type="combo">
    <desc> Admin Console rights for Server IMAP Tab </desc>
    <ui name="Configure-Servers-Server-IMAP"/>
    <rights>
      <r n="setAdminConsoleServerIMAPTab"/>
      <r n="viewAdminConsoleServerIMAPTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerPOPTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-POP(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerPOPTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-POP(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerPOPTabRights" type="combo">
    <desc> Admin Console rights for Server POP Tab </desc>
    <ui name="Configure-Servers-Server-POP"/>
    <rights>
      <r n="setAdminConsoleServerPOPTab"/>
      <r n="viewAdminConsoleServerPOPTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerVolumesTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server Volumes Tab </desc>
    <ui name="Configure-Servers-Server-Volumes(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerVolumesTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server Volumes Tab </desc>
    <ui name="Configure-Servers-Server-Volumes(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerVolumesTabRights" type="combo">
    <desc> Admin Console rights for Server Volumes Tab </desc>
    <ui name="Configure-Servers-Server-Volumes"/>
    <rights>
      <r n="setAdminConsoleServerVolumesTab"/>
      <r n="viewAdminConsoleServerVolumesTab"/>
      <r n="manageVolume"/>
      <r n="flushCache"/>
      <r n="applianceAll"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerBackupRestoreTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server backup/restore Tab </desc>
    <ui name="Configure-Servers-Server-BackupRestore(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerBackupRestoreTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server backup/restore Tab </desc>
    <ui name="Configure-Servers-Server-BackupRestore(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerBackupRestoreTabRights" type="combo">
    <desc> Admin Console rights for Server BackupRestore Tab </desc>
    <ui name="Configure-Servers-Server-BackupRestore"/>
    <rights>
      <r n="setAdminConsoleServerBackupRestoreTab"/>
      <r n="viewAdminConsoleServerBackupRestoreTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleServerACLTab" type="setAttrs" targetType="server">
    <desc> Admin Console set attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleServerACLTab" type="getAttrs" targetType="server">
    <desc> Admin Console view attr rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleServerACLTabRights" type="combo">
    <desc> Admin Console rights for Server ACL Tab </desc>
    <ui name="Configure-Servers-Server-ACL"/>
    <rights>
      <r n="setAdminConsoleServerACLTab"/>
      <r n="viewAdminConsoleServerACLTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleZimletACLTab" type="setAttrs" targetType="zimlet">
    <desc> Admin Console set attr rights for Zimlet ACL Tab </desc>
    <ui name="Configure-Zimlets-Zimlet-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleZimletACLTab" type="getAttrs" targetType="zimlet">
    <desc> Admin Console view attr rights for Zimlet ACL Tab </desc>
    <ui name="Configure-Zimlets-Zimlet-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleZimletACLTabRights" type="combo">
    <desc> Admin Console rights for Zimlet ACL Tab </desc>
    <ui name="Configure-Zimlets-Zimlet-ACL"/>
    <rights>
      <r n="setAdminConsoleZimletACLTab"/>
      <r n="viewAdminConsoleZimletACLTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleExtensionACLTab" type="setAttrs" targetType="domain">
    <desc> Admin Console set attr rights for Extensions ACL Tab </desc>
    <ui name="Configure-AdminExtensions-AdminExtension-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleExtensionACLTab" type="getAttrs" targetType="domain">
    <desc> Admin Console view attr rights for Extensions ACL Tab </desc>
    <ui name="Configure-AdminExtensions-AdminExtension-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleExtensionACLTabRights" type="combo">
    <desc> Admin Console rights for Extensions ACL Tab </desc>
    <ui name="Configure-AdminExtensions-AdminExtension-ACL"/>
    <rights>
      <r n="setAdminConsoleExtensionACLTab"/>
      <r n="viewAdminConsoleExtensionACLTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalInfoTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for Global Info Tab </desc>
    <ui name="Configure-GlobalSettings-GeneralInfo(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalInfoTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for Global Info Tab </desc>
    <ui name="Configure-GlobalSettings-GeneralInfo(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalInfoTabRights" type="combo">
    <desc> Admin Console rights for Global Info Tab </desc>
    <ui name="Configure-GlobalSettings-GeneralInfo"/>
    <rights>
      <r n="setAdminConsoleGlobalInfoTab"/>
      <r n="viewAdminConsoleGlobalInfoTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalAttachmentsTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for Global Attachments Tab </desc>
    <ui name="Configure-GlobalSettings-Attachments(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalAttachmentsTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for Global Attachments Tab </desc>
    <ui name="Configure-GlobalSettings-Attachments(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalAttachmentsTabRights" type="combo">
    <desc> Admin Console rights for Global Attachments Tab </desc>
    <ui name="Configure-GlobalSettings-Attachments"/>
    <rights>
      <r n="setAdminConsoleGlobalAttachmentsTab"/>
      <r n="viewAdminConsoleGlobalAttachmentsTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalMTATab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for Global MTA Tab </desc>
    <ui name="Configure-GlobalSettings-MTA(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalMTATab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for Global MTA Tab </desc>
    <ui name="Configure-GlobalSettings-MTA(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalMTATabRights" type="combo">
    <desc> Admin Console rights for Global MTA Tab </desc>
    <ui name="Configure-GlobalSettings-MTA"/>
    <rights>
      <r n="setAdminConsoleGlobalMTATab"/>
      <r n="viewAdminConsoleGlobalMTATab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalIMAPTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for Global IMAP Tab </desc>
    <ui name="Configure-GlobalSettings-IMAP(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalIMAPTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for Global IMAP Tab </desc>
    <ui name="Configure-GlobalSettings-IMAP(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalIMAPTabRights" type="combo">
    <desc> Admin Console rights for Global IMAP Tab </desc>
    <ui name="Configure-GlobalSettings-IMAP"/>
    <rights>
      <r n="setAdminConsoleGlobalIMAPTab"/>
      <r n="viewAdminConsoleGlobalIMAPTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalPOPTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for Global POP Tab </desc>
    <ui name="Configure-GlobalSettings-POP(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalPOPTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for Global POP Tab </desc>
    <ui name="Configure-GlobalSettings-POP(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalPOPTabRights" type="combo">
    <desc> Admin Console rights for Global POP Tab </desc>
    <ui name="Configure-GlobalSettings-POP"/>
    <rights>
      <r n="setAdminConsoleGlobalPOPTab"/>
      <r n="viewAdminConsoleGlobalPOPTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalASAVTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for Global AS/AV Tab </desc>
    <ui name="Configure-GlobalSettings-AS/AV(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalASAVTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for Global AS/AV Tab </desc>
    <ui name="Configure-GlobalSettings-AS/AV(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalASAVTabRights" type="combo">
    <desc> Admin Console rights for Global AS/AV Tab </desc>
    <ui name="Configure-GlobalSettings-AS/AV"/>
    <rights>
      <r n="setAdminConsoleGlobalASAVTab"/>
      <r n="viewAdminConsoleGlobalASAVTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalFreebusyTab" type="setAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalFreebusy Tab </desc>
    <ui name="Configure-GlobalSettings-FreeBusyInterop(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalFreebusyTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalFreebusy Tab </desc>
    <ui name="Configure-GlobalSettings-FreeBusyInterop(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalFreebusyTabRights" type="combo">
    <desc> Admin Console rights for GlobalFreebusy Tab </desc>
    <ui name="Configure-GlobalSettings-FreeBusyInterop"/>
    <rights>
      <r n="setAdminConsoleGlobalFreebusyTab"/>
      <r n="viewAdminConsoleGlobalFreebusyTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalThemesTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for GlobalThemes Tab </desc>
    <ui name="Configure-GlobalSettings-Themes(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalThemesTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalThemes Tab </desc>
    <ui name="Configure-GlobalSettings-Themes(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalThemesTabRights" type="combo">
    <desc> Admin Console rights for GlobalThemes Tab </desc>
    <ui name="Configure-GlobalSettings-Themes"/>
    <rights>
      <r n="setAdminConsoleGlobalThemesTab"/>
      <r n="viewAdminConsoleGlobalThemesTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalBackupRestoreTab" type="setAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalBackupRestore Tab </desc>
    <ui name="Configure-GlobalSettings-BackupRestore(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalBackupRestoreTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalBackupRestore Tab </desc>
    <ui name="Configure-GlobalSettings-BackupRestore(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalBackupRestoreTabRights" type="combo">
    <desc> Admin Console rights for GlobalBackupRestore Tab </desc>
    <ui name="Configure-GlobalSettings-BackupRestore"/>
    <rights>
      <r n="setAdminConsoleGlobalBackupRestoreTab"/>
      <r n="viewAdminConsoleGlobalBackupRestoreTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalACLTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for GlobalACL Tab </desc>
    <ui name="Configure-GlobalSettings-ACL(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalACLTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalACL Tab </desc>
    <ui name="Configure-GlobalSettings-ACL(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalACLTabRights" type="combo">
    <desc> Admin Console rights for GlobalACL Tab </desc>
    <ui name="Configure-GlobalSettings-ACL"/>
    <rights>
      <r n="setAdminConsoleGlobalACLTab"/>
      <r n="viewAdminConsoleGlobalACLTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalHSMTab" type="setAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalHSM Tab </desc>
    <ui name="Configure-GlobalSettings-HSM(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalHSMTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalHSM Tab </desc>
    <ui name="Configure-GlobalSettings-HSM(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalHSMTabRights" type="combo">
    <desc> Admin Console rights for GlobalHSM Tab </desc>
    <ui name="Configure-GlobalSettings-HSM"/>
    <rights>
      <r n="setAdminConsoleGlobalHSMTab"/>
      <r n="viewAdminConsoleGlobalHSMTab"/>
    </rights>
  </right>

  <right name="setAdminConsoleGlobalLicenseTab" type="setAttrs" targetType="config">
    <desc> Admin Console set attr rights for GlobalLicense Tab </desc>
    <ui name="Configure-GlobalSettings-License(modify)"/>
    <attrs>

    </attrs>
  </right>
  <right name="viewAdminConsoleGlobalLicenseTab" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for GlobalLicense Tab </desc>
    <ui name="Configure-GlobalSettings-License(view)"/>
    <attrs>

    </attrs>
  </right>
  <right name="adminConsoleGlobalLicenseTabRights" type="combo">
    <desc> Admin Console rights for GlobalLicense Tab </desc>
    <ui name="Configure-GlobalSettings-License"/>
    <rights>
      <r n="setAdminConsoleGlobalLicenseTab"/>
      <r n="viewAdminConsoleGlobalLicenseTab"/>
    </rights>
  </right>

<right name="viewAdminConsoleServerStatus" type="getAttrs" targetType="config">
    <desc> Admin Console view attr rights for server status Tab </desc>
    <ui name="Monitor-ServerStatus"/>
    <attrs>

    </attrs>
</right>

<right type="combo" name="adminConsoleAccountRights">
  <desc>Admin Console Account Rights</desc>
  <ui name="Manage-Accounts"/>
  <rights>
    <r n="getMailboxInfo"/>
    <r n="adminConsoleAccountsInfoTabRights"/>
    <r n="adminConsoleAccountsContactTabRights"/>
    <r n="adminConsoleAccountsMemberOfTabRights"/>
    <r n="adminConsoleAccountsAliasesTabRights"/>
    <r n="adminConsoleAccountsForwardingTabRights"/>
    <r n="adminConsoleAccountsThemesTabRights"/>
    <r n="listAccount"/>
    <r n="viewAccountAdminUI"/>
    <r n="get.account.zimbraIsSystemResource"/>
    <r n="get.account.zimbraIsSystemAccount"/>
  </rights>
</right>

<right type="combo" name="adminConsoleAliasRights">
  <desc>Admin Console Alias Rights</desc>
  <ui name="Manage-Aliases"/>
  <rights>
    <r n="viewAccountAdminUI"/>
    <r n="listAlias"/>
  </rights>
</right>

<right type="combo" name="adminConsoleDLRights">
  <desc>Admin Console DL Rights</desc>
  <ui name="Manage-DistributionLists"/>
  <rights>
    <r n="adminConsoleDLMembersTabRights"/>
    <r n="adminConsoleDLNotesTabRights"/>
    <r n="adminConsoleDLMemberOfTabRights"/>
    <r n="adminConsoleDLAliasesTabRights"/>
    <r n="adminConsoleDLSharesTabRights"/>
    <r n="listDistributionList"/>
    <r n="viewDistributionListAdminUI"/>
  </rights>
</right>

<right type="combo" name="adminConsoleResourceRights">
  <desc>Admin Console Resource Rights</desc>
  <ui name="Manage-Resources"/>
  <rights>
    <r n="adminConsoleResourcesPropertiesTabRights"/>
    <r n="adminConsoleResourcesContactTabRights"/>
    <r n="listCalendarResource"/>
    <r n="viewAccountAdminUI"/>
  </rights>
</right>

<right type="combo" name="adminConsoleCOSRights">
  <desc>Admin Console COS Rights</desc>
  <ui name="Manage-COS"/>
  <rights>
    <r n="adminConsoleResourcesPropertiesTabRights"/>
    <r n="adminConsoleCOSInfoTabRights"/>
    <r n="adminConsoleCOSFeaturesTabRights"/>
    <r n="adminConsoleCOSPreferencesTabRights"/>
    <r n="adminConsoleCOSThemesTabRights"/>
    <r n="adminConsoleCOSZimletsTabRights"/>
    <r n="adminConsoleCOSServerPoolTabRights"/>
    <r n="adminConsoleCOSAdvancedTabRights"/>
    <r n="adminConsoleCOSACLTabRights"/>
    <r n="adminConsoleCOSMobileTabRights"/>
    <r n="listCos"/>
    <r n="modifyCos"/>
    <r n="renameCos"/>
    <r n="deleteCos"/>
  </rights>
</right>

<right type="combo" name="adminConsoleDomainRights">
  <desc ui="">Admin Console Domain Rights</desc>
  <ui name="Configure-Domains"/>
  <rights>

    <r n="adminConsoleDomainInfoTabRights"/>
    <r n="adminConsoleDomainGALTabRights"/>
    <r n="adminConsoleDomainAuthenticationTabRights"/>
    <r n="adminConsoleDomainVirtualHostsTabRights"/>
    <r n="adminConsoleDomainDocumentsTabRights"/>
    <r n="adminConsoleDomainFreebusyTabRights"/>
    <r n="adminConsoleDomainZimletsTabRights"/>
    <r n="adminConsoleDomainThemesTabRights"/>
    <r n="adminConsoleDomainLimitsTabRights"/>
    <r n="adminConsoleDomainACLTabRights"/>
    <r n="listAlias"/>
    <r n="listDomain"/>
    <r n="deleteDomain"/>
    <r n="countAccount"/>
    <r n="checkDomainMXRecord"/>
  </rights>
</right>

<right type="combo" name="adminConsoleSubDomainRights">
  <desc ui="">Admin Console Sub Domain Rights</desc>
  <ui name="Configure-Domains"/>
  <rights>

    <r n="adminConsoleDomainInfoTabRights"/>
    <r n="adminConsoleDomainGALTabRights"/>
    <r n="adminConsoleDomainAuthenticationTabRights"/>
    <r n="adminConsoleDomainVirtualHostsTabRights"/>
    <r n="adminConsoleDomainDocumentsTabRights"/>
    <r n="adminConsoleDomainFreebusyTabRights"/>
    <r n="adminConsoleDomainZimletsTabRights"/>
    <r n="adminConsoleDomainThemesTabRights"/>
    <r n="adminConsoleDomainLimitsTabRights"/>
    <r n="adminConsoleDomainACLTabRights"/>
    <r n="listAlias"/>
    <r n="listDomain"/>
    <r n="deleteDomain"/>
    <r n="countAccount"/>
    <r n="checkDomainMXRecord"/>
  </rights>
</right>

<right type="combo" name="adminConsoleSavedSearchRights">
  <desc>Admin Console Saved Search Rights</desc>
  <ui name="Search-SavedSearches-SavedSearch-Edit"/>
  <rights>
    <r n="setAdminSavedSearch"/>
    <r n="viewAdminSavedSearch"/>
  </rights>
</right>

<right type="combo" name="adminConsoleCreateTopDomainRights">

  <desc>Admin Console Create Top Domain Rights</desc>
  <ui name="Configure-Domains-Domain-New"/>
  <rights>
      <r n="createSubDomain"/>
      <r n="createTopDomain"/>
      <r n="adminConsoleCreateGALRights"/>
      <r n="adminConsoleAccountRights"></r>
      <r n="adminConsoleDLRights"></r>
      <r n="adminConsoleResourceRights"></r>
      <r n="adminConsoleAliasRights"></r>
      <r n="adminConsoleSavedSearchRights"></r>
      <r n="adminConsoleDomainRights"></r>
  </rights>
</right>

<right type="combo" name="adminConsoleCreateSubDomainModifierRights">

  <desc>Admin Console Create Sub Domain Rights</desc>
  <ui name="Configure-Domains-Domain-New"/>
  <rights>
       <r n="adminConsoleDomainRights"/>
  </rights>
</right>

<right type="combo" name="adminConsoleCreateSubDomainRights">
  <desc>Admin Console Create Sub Domain Account Rights</desc>
  <ui name="Configure-Domains-Domain-New"/>
  <rights>

    <r n="adminConsoleAccountRights"></r>
    <r n="adminConsoleDLRights"></r>
    <r n="adminConsoleResourceRights"></r>
    <r n="adminConsoleAliasRights"></r>
    <r n="adminConsoleSavedSearchRights"></r>
    <r n="adminConsoleDomainRights"></r>
    <r n="adminConsoleCreateGALRights"></r>
    <r n="createSubDomain"/>
  </rights>
</right>

<right type="combo" name="adminConsoleServerRights">
  <desc>Admin Console Server Rights</desc>
  <ui name="Configure-Servers"/>
  <rights>

    <r n="adminConsoleServerInfoTabRights"/>
    <r n="adminConsoleServerServicesTabRights"/>
    <r n="adminConsoleServerMTATabRights"/>
    <r n="adminConsoleServerIMAPTabRights"/>
    <r n="adminConsoleServerPOPTabRights"/>
    <r n="adminConsoleServerVolumesTabRights"/>
    <r n="adminConsoleServerBackupRestoreTabRights"/>
    <r n="adminConsoleServerACLTabRights"/>
    <r n="listServer"/>
    <r n="deleteServer"/>
    <r n="modifyServer"/>
    <r n="flushCache"/>
  </rights>
</right>

<right type="combo" name="adminConsoleZimletRights">
  <desc>Admin Console Zimlet Rights</desc>
  <ui name="Configure-Zimlets"/>
  <rights>
    <r n="adminConsoleZimletACLTabRights"/>
    <r n="listZimlet"/>
    <r n="deleteZimlet"/>
    <r n="modifyZimlet"/>

  </rights>
</right>

<right type="combo" name="adminConsoleExtensionRights">
  <desc>Admin Console Extension Rights</desc>
  <ui name="Configure-AdminExtensions"/>
  <rights>
    <r n="adminConsoleExtensionACLTabRights"/>

  </rights>
</right>

<right type="combo" name="adminConsoleGlobalRights">
  <desc>Admin Console Global Rights</desc>
  <ui name="Configure-GlobalSettings"/>
  <rights>
    <r n="adminConsoleGlobalInfoTabRights"/>
    <r n="adminConsoleGlobalAttachmentsTabRights"/>
    <r n="adminConsoleGlobalMTATabRights"/>
    <r n="adminConsoleGlobalIMAPTabRights"/>
    <r n="adminConsoleGlobalPOPTabRights"/>
    <r n="adminConsoleGlobalASAVTabRights"/>
    <r n="adminConsoleGlobalFreebusyTabRights"/>
    <r n="adminConsoleGlobalThemesTabRights"/>
    <r n="adminConsoleGlobalBackupRestoreTabRights"/>
    <r n="adminConsoleGlobalACLTabRights"/>
    <r n="adminConsoleGlobalHSMTabRights"/>
    <r n="adminConsoleGlobalLicenseTabRights"/>
  </rights>
</right>

<right type="combo" name="adminConsoleServerStatusRights">
  <desc>Admin Console Server Status Rights</desc>
  <ui name="Monitor-ServerStatus"/>
  <rights>
    <r n="getServiceStatus"/>
    <r n="listServer"/>
    <r n="viewAdminConsoleServerStatus" />
  </rights>
</right>

<right type="combo" name="adminConsoleServerStatisticRights">
  <desc>Admin Console Server Statistics Rights</desc>
  <ui name="Monitor-ServerStatistics"/>
  <rights>
    <r n="getServerStats"/>
    <r n="listServer"/>
    <r n="getSessions"/>
  </rights>
</right>

<right type="combo" name="adminConsoleMailQueueRights">
  <desc>Admin Console Mail Queue Rights</desc>
  <ui name="Monitor-MailQueues"/>
  <rights>
    <r n="mailQueueRights"/>
  </rights>
</right>

<right type="combo" name="adminConsoleBackupRights">
  <desc>Admin Console Backup Rights</desc>
  <ui name="ToolsAndMigration-Backups"/>
  <rights>
    <r n="backupAccount"/>
    <r n="restoreAccount"/>
    <r n="moveAccountMailbox"/>
    <r n="moveCalendarResourceMailbox"/>
    <r n="moveMailboxFromServer"/>
    <r n="moveMailboxToServer"/>
    <r n="modifyZimlet"/>
    <r n="listZimlet"/>
    <r n="listServer"/>
  </rights>
</right>

<right type="combo" name="adminConsoleCrossMailboxSearchRights">
  <desc>Admin Console Cross Mailbox Search Rights</desc>
  <ui name="ToolsAndMigration-SearchMail"/>
  <rights>
    <r n="crossMailboxSearchRights"/>
    <r n="listAccount"/>
    <r n="createAccount"/>
  </rights>
</right>

<right type="combo" name="adminConsoleCertificateRights">
  <desc>Rights for configuring SSL certificate on a server through Admin Console</desc>
  <ui name="Configure-Certificates"/>
  <rights>
   <r n="listServer" />
   <r n="getCertificateInfo"/>
   <r n="installCertificate"/>
   <r n="getCSR"/>
   <r n="generateCSR"/>
  </rights>
</right>

<right name="viewAdminConsoleSoftwareUpdatesConfigAttrs" type="getAttrs" targetType="config">
  <desc> Admin Console view attr rights for software updates tab </desc>
  <ui name="ToolsAndMigration-SoftwareUpdates(view)"/>
  <attrs>

	</attrs>
</right>

<right name="setAdminConsoleSoftwareUpdatesConfigAttrs" type="setAttrs" targetType="config">
  <desc> Admin Console view attr rights for software updates tab </desc>
  <ui name="ToolsAndMigration-SoftwareUpdates(modify)"/>
  <attrs>

	  </attrs>
</right>

<right name="viewAdminConsoleSoftwareUpdatesServerAttrs" type="getAttrs" targetType="server">
  <desc> Admin Console view attr rights for software updates tab </desc>
  <ui name="ToolsAndMigration-SoftwareUpdates(view)"/>
  <attrs>

  </attrs>
</right>

<right type="combo" name="adminConsoleMigrationRights">
  <desc>Rights for running migration tasks on a server through Admin Console</desc>
  <ui name="ToolsAndMigration-AccountMigration"/>
  <rights>
   <r n="listServer" />
   <r n="getServer" />
   <r n="createMigrationTask"/>
  </rights>
</right>

<right type="combo" name="adminConsoleSoftwareUpdatesRights">
  <desc>Rights for configuring software updates component a server through Admin Console</desc>
  <ui name="ToolsAndMigration-SoftwareUpdates"/>
  <rights>
   <r n="listServer" />
   <r n="listAccount" />
   <r n="checkSoftwareUpdates"/>
   <r n="viewAdminConsoleSoftwareUpdatesConfigAttrs"/>
   <r n="setAdminConsoleSoftwareUpdatesConfigAttrs"/>
   <r n="viewAdminConsoleSoftwareUpdatesServerAttrs"/>
  </rights>
</right>

<right type="combo" name="adminConsoleClientUploadRights">
    <desc>Rights for uploading client software through Admin Console</desc>
    <ui name="Configure-Zimlets-Deploy"/>
    <rights>
        <r n="uploadClientSoftware" />
        <r n="modifyZimlet"/>
        <r n="listZimlet"/>
    </rights>
</right>

<right type="combo" name="adminConsoleUCServiceRights">
    <desc>Rights for viewing Voice/Chat services through Admin Console</desc>
    <ui name="Configure-Voice/Chat"/>
    <rights>
        <r n="listUCService" />
    </rights>
</right>

<right type="combo" name="adminConsoleRights">
  <desc>Admin Console Rights and Views</desc>
  <ui name="home"/>
  <rights>
    <r n="adminConsoleAccountRights"/>
    <r n="adminConsoleAliasRights"/>
    <r n="adminConsoleDLRights"/>
    <r n="adminConsoleResourceRights"/>
    <r n="adminConsoleCOSRights"/>
    <r n="adminConsoleDomainRights"/>
    <r n="adminConsoleServerRights"/>
    <r n="adminConsoleZimletRights"/>
    <r n="adminConsoleExtensionRights"/>
    <r n="adminConsoleGlobalRights"/>
    <r n="adminConsoleServerStatusRights"/>
    <r n="adminConsoleServerStatisticRights"/>
    <r n="adminConsoleMailQueueRights"/>
    <r n="adminConsoleCertificateRights"/>
    <r n="adminConsoleBackupRights"/>
    <r n="adminConsoleCrossMailboxSearchRights"/>
    <r n="adminConsoleSavedSearchRights"/>
    <r n="adminConsoleSoftwareUpdatesRights"/>
    <r n="adminConsoleMigrationRights"/>
    <r n="adminConsoleClientUploadRights"/>
    <r n="adminConsoleUCServiceRights"/>
  </rights>
</right>

</rights>


text:
package org.apache.harmony.xnet.provider.jsse;

import java.nio.ByteBuffer;

/**
 * This class provides the DataStream functionality
 * implemented over the array of ByteBuffer instances.
 * Among with the data chunks read functionality
 * it provides the info about amount of consumed data.
 * The source ByteBuffer objects can be replaced by other.
 * So one instance of this wrapper can be reused for several
 * data sources.
 */
public class SSLEngineDataStream implements DataStream {

    private ByteBuffer[] srcs;
    private int offset;
    private int limit;

    private int available;
    private int consumed;

    protected SSLEngineDataStream() {}

    protected void setSourceBuffers(ByteBuffer[] srcs, int offset, int length) {
        this.srcs = srcs;
        this.offset = offset;
        this.limit = offset+length;
        this.consumed = 0;
        this.available = 0;
        for (int i=offset; i<limit; i++) {
            if (srcs[i] == null) {
                throw new IllegalStateException(
                        "Some of the input parameters are null");
            }
            available += srcs[i].remaining();
        }
    }

    public int available() {
        return available;
    }

    public boolean hasData() {
        return available > 0;
    }

    public byte[] getData(int length) {
        // TODO: optimization work:
        // use ByteBuffer.get(byte[],int,int)
        // and ByteBuffer.hasArray() methods
        int len = (length < available) ? length : available;
        available -= len;
        consumed += len;
        byte[] res = new byte[len];
        int pos = 0;
        loop:
        for (; offset<limit; offset++) {
            while (srcs[offset].hasRemaining()) {
                res[pos++] = srcs[offset].get();
                len --;
                if (len == 0) {
                    break loop;
                }
            }
        }
        return res;
    }

    protected int consumed() {
        return consumed;
    }
}


text:
package com.zhimei.liang.weixiaoyuan;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.telephony.SmsManager;
import android.util.Log;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.bmob.pay.tool.BmobPay;
import com.bmob.pay.tool.PayListener;
import com.zhimei.liang.customview.CircleImageDrawable;
import com.zhimei.liang.customview.RoundImageView;
import com.zhimei.liang.fragment.IndexFragment;
import com.zhimei.liang.utitls.FileHelper;
import com.zhimei.liang.utitls.MyApplication;
import com.zhimei.liang.utitls.SecondHandGoods;
import com.zhimei.liang.utitls.ShoppingTable;
import com.zhimei.liang.utitls.User;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import cn.bmob.v3.BmobQuery;
import cn.bmob.v3.listener.DeleteListener;
import cn.bmob.v3.listener.FindListener;
import cn.bmob.v3.listener.SaveListener;
import cn.bmob.v3.listener.ThumbnailUrlListener;

public class TradeWindowActivity extends Activity {
    private ImageView publishManPicture;
    private TextView et_publishManName;
    private TextView et_goodName;
    private TextView et_goodDescription;
    private TextView et_goodPrice;
    private TextView et_time;
    private TextView et_address;
    private ImageButton index,back;
    private RelativeLayout duanxin,phone,chat,zhifubao;
    private HashMap<String,Object> hashMap;//得到上一个活动中的Acyivity
    private ImageView goodPicture;
    private String phoneNumber;
    private BmobQuery<User> query ;
    private ProgressDialog progressDialog;
    private String headPictureUrl;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_trade_window);
        initViews();
    }

    void initViews(){
        back=(ImageButton)findViewById(R.id.trade_window_succ_back);
        index=(ImageButton)findViewById(R.id.trade_window_succ_index);

        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        index.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
                Intent intent=new Intent(TradeWindowActivity.this,MainActivity.class);
                startActivity(intent);
            }
        });

        hashMap= MyApplication.getHashmap();
        et_address=(TextView)findViewById(R.id.tv_address);
        et_publishManName=(TextView)findViewById(R.id.publishman_name);
        et_goodName=(TextView)findViewById(R.id.goods_name);
        et_goodDescription=(TextView)findViewById(R.id.good_miaoshu);
        et_goodPrice=(TextView)findViewById(R.id.goods_price);
        et_time=(TextView)findViewById(R.id.publish_time);
        index=(ImageButton)findViewById(R.id.trade_window_succ_index);
        back=(ImageButton)findViewById(R.id.trade_window_succ_back);
        duanxin=(RelativeLayout)findViewById(R.id.all);
        phone=(RelativeLayout)findViewById(R.id.per_center);
        chat=(RelativeLayout)findViewById(R.id.trade_windowation);
        zhifubao=(RelativeLayout)findViewById(R.id.sec_market);
        goodPicture=(ImageView)findViewById(R.id.trade_goods_picture);
        publishManPicture=(ImageView)findViewById(R.id.publishman_touxiang);
        /**
         * 在头像加载之前,先给publishManPicture设置一张图片,使用JNI的方式获取图片的bitmap对象
         * 使用try catch是为了防止OOM
         */
        try{
            publishManPicture.setImageDrawable(new CircleImageDrawable(new FileHelper().readBitmap(this,R.mipmap.logo4)));

        }
        catch (OutOfMemoryError error){
            publishManPicture.setImageDrawable(new CircleImageDrawable(new FileHelper().readBitmap(this,R.mipmap.logo4)));

            error.printStackTrace();
            Log.i("liang","内存泄露");
        }

        duanxin.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                /**
                 * 短信内容
                 */
                final String message="你好,我对你发布的商品""+hashMap.get("name").toString()
                        +""比较满意,咱们能进一步联系吗?";
                AlertDialog.Builder dialog=new AlertDialog.Builder(TradeWindowActivity.this);
                dialog.setTitle("将发送短信至" + phoneNumber);
                dialog.setIcon(R.mipmap.test1);
                dialog.setMessage(message);
                dialog.setCancelable(false);
                dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        SmsManager smsManager = SmsManager.getDefault();
                        smsManager.sendTextMessage(phoneNumber, null, message, null, null);
                    }
                });

                dialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                    }
                });
                dialog.show();

            }
        });

        phone.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder dialog=new AlertDialog.Builder(TradeWindowActivity.this);
                dialog.setTitle("将打电话至:");
                dialog.setMessage(phoneNumber);
                dialog.setIcon(R.mipmap.test1);
                dialog.setCancelable(false);
                dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
                        startActivity(intent);
                    }
                });
                dialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                    }
                });
                dialog.show();

            }
        });

       chat.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(TradeWindowActivity.this,ChatActivity.class);
                startActivity(intent);

            }
        });

        /**
         * 支付宝支付,支付宝支付成功后,要删除数据
         */

        zhifubao.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder dialog = new AlertDialog.Builder(TradeWindowActivity.this);
                dialog.setTitle("支付说明");
                dialog.setIcon(R.mipmap.zhifubao);
                dialog.setMessage("亲爱的用户,你将向本品台支付人民币" + hashMap.get("price") + "元,支付后,本平台将立刻派送" +
                        "配货人员,将你所需要的商品,送到你的住址。祝你购物愉快");
                dialog.setCancelable(false);

                dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        pay();
                    }
                });
                dialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
                dialog.show();
            }
        });

        et_goodDescription.setText(hashMap.get("description").toString());
        et_publishManName.setText(hashMap.get("publishMan").toString());
        et_goodName.setText(hashMap.get("name").toString());
        et_goodPrice.setText(hashMap.get("price").toString());
        et_time.setText(hashMap.get("time").toString());
        Bitmap picture=(Bitmap) hashMap.get("bitmap");
        goodPicture.setImageBitmap(picture);
        /**
         * 查询用户信息
         */
        getPublishManInformation();

    }

    /**
     * 通过查询获取发布人的一些信息
     */
    void getPublishManInformation(){
        String publishMan;
        publishMan=hashMap.get("publishMan").toString();
        query=new BmobQuery<User>();
        progressDialog=ProgressDialog.show(TradeWindowActivity.this, "", "正在连接服务器");
        query.addWhereEqualTo("username",publishMan);
        query.findObjects(TradeWindowActivity.this, new FindListener<User>() {
            @Override
            public void onSuccess(List<User> list) {
                progressDialog.dismiss();
                et_address.setText(list.get(0).getAddress());
                phoneNumber=list.get(0).getMobilePhoneNumber();

                list.get(0).getPicture().getThumbnailUrl(TradeWindowActivity.this, 200, 275, 15, new ThumbnailUrlListener() {
                    @Override
                    public void onSuccess(String s) {
                        headPictureUrl = s;
                        /**
                         * 加载缩略图
                         */
                       // new LoadPicture().execute();
                        Toast.makeText(TradeWindowActivity.this,"线程已经结束",Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onFailure(int i, String s) {
                        progressDialog.dismiss();

                    }
                });
            }

            @Override
            public void onError(int i, String s) {
                progressDialog.dismiss();

            }
        });

    }

    class LoadPicture extends AsyncTask<Void,Integer,Boolean>{
        private Bitmap bitmap;
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }

        @Override
        protected void onPostExecute(Boolean aBoolean) {
            super.onPostExecute(aBoolean);
            publishManPicture.setImageDrawable(new CircleImageDrawable(bitmap));
            /**
             * 关闭图片资源
             */
           // new FileHelper().recycle(bitmap);
        }

        @Override
        protected Boolean doInBackground(Void... params) {
             bitmap=new FileHelper().getHttpBitmap(headPictureUrl);
            return null;
        }

        @Override
        protected void onProgressUpdate(Integer... values) {
            super.onProgressUpdate(values);
        }
    }

    /**
     * 支付结束后要从后台删除数据,删除之前,必须要通过查询获取商品id
     */

    void queryDataThenDelete(){
         BmobQuery<SecondHandGoods> query_decond=new BmobQuery<>() ;
        query_decond.addWhereEqualTo("name",hashMap.get("name").toString());
        query_decond.addWhereEqualTo("description",hashMap.get("description").toString());
        query_decond.addWhereEqualTo("publishMan", MyApplication.getCurrentName());
        query_decond.findObjects(TradeWindowActivity.this, new FindListener<SecondHandGoods>() {
            @Override
            public void onSuccess(List<SecondHandGoods> list) {
                /**
                 * 删除数据
                 * 将购买的信息表传至服务器
                 */
                deleteData(list.get(0).getObjectId());
                loadShoppingTable((ArrayList) list);
            }

            @Override
            public void onError(int i, String s) {
                Log.i("liang", s);

            }
        });
    }

    /**
     * 根据查询获得的id删除数据
     * @param id
     */

    void deleteData(String id){
        SecondHandGoods secondHandGoods=new SecondHandGoods();
        secondHandGoods.setObjectId(id);
        secondHandGoods.delete(TradeWindowActivity.this, new DeleteListener() {
            @Override
            public void onSuccess() {

            }

            @Override
            public void onFailure(int i, String s) {

            }
        });
    }

    void pay(){
        new BmobPay(TradeWindowActivity.this).pay(Float.parseFloat(hashMap.get("price").toString().substring(2)), hashMap.get("name").toString(), new PayListener() {
            @Override
            public void orderId(String s) {
                Log.i("liang", s);

            }

            @Override
            public void succeed() {
                queryDataThenDelete();
                new FileHelper().storeUpScore(TradeWindowActivity.this, 3);
                Toast.makeText(TradeWindowActivity.this, "支付成功", Toast.LENGTH_SHORT).show();

            }

            @Override
            public void fail(int i, String s) {

            }

            @Override
            public void unknow() {

            }
        });

    }

    /**
     * 将购物信息上传至服务器
     * @param arrayList
     */
    void loadShoppingTable(ArrayList<SecondHandGoods> arrayList){
        ShoppingTable shoppingTable =new ShoppingTable();
        shoppingTable.setGoodName(arrayList.get(0).getName());
        shoppingTable.setBuyManName(MyApplication.getCurrentName());
        shoppingTable.setGoodDescription(arrayList.get(0).getDescription());
        shoppingTable.setTradeWay(arrayList.get(0).getTradeWay());
        shoppingTable.setGoodPictureFile(arrayList.get(0).getPictureFile());
        shoppingTable.setGoodID(arrayList.get(0).getObjectId());
        shoppingTable.setGoodPrice(arrayList.get(0).getPrice());
        shoppingTable.save(TradeWindowActivity.this, new SaveListener() {
            @Override
            public void onSuccess() {

            }

            @Override
            public void onFailure(int i, String s) {

            }
        });
    }

    @Override
    public void finish() {
        super.finish();
       // goodPicture.setImageBitmap(null);
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Interface org.eclipse.emf.cdo.server.db.mapping.ITypeMapping (CDO Model Repository Documentation)</title>
<meta name="date" content="">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
org.eclipse.emf.cdo.server.db.mapping.ITypeMapping

Packages that use ITypeMapping

Package
Description

org.eclipse.emf.cdo.server.db

Server concepts for dealing with DB stores and accessors.

org.eclipse.emf.cdo.server.db.mapping

Server concepts for dealing with mapping strategies and mappings for classes, lists and types.

Uses of ITypeMapping in org.eclipse.emf.cdo.server.db

Methods in org.eclipse.emf.cdo.server.db that return ITypeMapping

Modifier and Type
Method and Description

ITypeMapping
IIDHandler.getObjectTypeMapping()

Uses of ITypeMapping in org.eclipse.emf.cdo.server.db.mapping

Classes in org.eclipse.emf.cdo.server.db.mapping that implement ITypeMapping

Modifier and Type
Class and Description

class
AbstractTypeMapping

This is a default implementation for the ITypeMapping interface which provides default behavor for all common
 types.

Methods in org.eclipse.emf.cdo.server.db.mapping that return ITypeMapping

Modifier and Type
Method and Description

abstract ITypeMapping
AbstractTypeMappingFactory.create(String description)

ITypeMapping
ITypeMapping.Provider.createTypeMapping(IMappingStrategy mappingStrategy,
                 EStructuralFeature feature)

Create an ITypeMapping implementation.

ITypeMapping
IMappingStrategy.createValueMapping(EStructuralFeature feature)

Factory for value mappings of single-valued attributes.

Methods in org.eclipse.emf.cdo.server.db.mapping that return types with arguments of type ITypeMapping

Modifier and Type
Method and Description

List<ITypeMapping>
IClassMapping.getValueMappings()

Skip navigation links

Overview

Package

Class

Use

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.


text:
require 'spec_helper'

describe "Cleanings" do
  describe "GET /cleanings" do
    it "works! (now write some real specs)" do
      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
      get cleanings_path
      response.status.should be(200)
    end
  end
end


text:
VisualManager::VisualManager(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::VisualManager)
{
    ui->setupUi(this);

    getSceneList();
    getPostFXList();

    //Connections
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(hide()));
    connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(apply()));
    connect(ui->okButton, SIGNAL(clicked()), this, SLOT(apply()));
    connect(ui->okButton, SIGNAL(clicked()), this, SLOT(hide()));
    connect(ui->deleteAButton, SIGNAL(clicked()), this, SLOT(delToA()));
    connect(ui->deleteBButton, SIGNAL(clicked()), this, SLOT(delToB()));
    connect(ui->deletePostButton, SIGNAL(clicked()), this, SLOT(delPost()));
    connect(ui->spinBox, SIGNAL(valueChanged(int)), this, SLOT(resolutionChanged()));
    connect(ui->spinBox_2, SIGNAL(valueChanged(int)), this, SLOT(resolutionChanged()));
    connect(ui->refreshScene, SIGNAL(clicked()), this, SLOT(getSceneList()));
    connect(ui->refreshPostFX, SIGNAL(clicked()), this, SLOT(getPostFXList()));
}

VisualManager::~VisualManager()
{
    delete ui;
}

void VisualManager::resolutionChanged()
{
    Core::instance()->setResolution( ui->spinBox->value(),ui->spinBox_2->value());
}

void VisualManager::delToA()
{
    delete ui->chanAList->currentItem() ;
}

void VisualManager::delToB()
{
    delete ui->chanBList->currentItem() ;
}

void VisualManager::delPost()
{
    delete ui->FXList->currentItem() ;
}

void VisualManager::getSceneList()
{
    ui->sceneList->clear();

    QDir dir("./data/scenes");
    QStringList files = dir.entryList();
    for(int i=0; i<files.size(); i++)
    {
        QString item = files.at(i).toLocal8Bit().constData();

        if( item != "." && item != ".." && item != ".svn" )
        {
            ui->sceneList->addItem(item);
        }
    }

}

void VisualManager::getPostFXList()
{
    ui->postFXList->clear();

    QDir dir("./data/postFX");
    QStringList files = dir.entryList();
    for(int i=0; i<files.size(); i++)
    {
        QString item = files.at(i).toLocal8Bit().constData();

        if( item != "." && item != ".." && item != ".svn" )
        {
            ui->postFXList->addItem(item);
        }
    }
}

void VisualManager::apply()
{
    QList<QListWidgetItem *> list;
    for(int i=0; i<ui->chanAList->count(); i++)
    {
        list.push_back(ui->chanAList->item(i));
    }
    emit newListChanA(list);

    list.clear();
    for(int i=0; i<ui->chanBList->count(); i++)
    {
        list.push_back(ui->chanBList->item(i));
    }
    emit newListChanB(list);

    list.clear();
    for(int i=0; i<ui->FXList->count(); i++)
    {
        list.push_back(ui->FXList->item(i));
    }
    emit newListFX(list);

    Core::instance()->Switch();
    if(Core::instance()->getCurrentChannel() != 0)
        Core::instance()->Switch();
}


text:
package blockchain::parity::ethpoller::plugin;

use strict;
use warnings;
use base qw(centreon::plugins::script_custom);

sub new {
    my ($class, %options) = @_;
    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
    bless $self, $class;

    $self->{version} = '0.1';
    %{$self->{modes}} = (
        'stats'     => 'blockchain::parity::ethpoller::mode::stats',
        'disk'      => 'blockchain::parity::ethpoller::mode::disk',
        'tracking'  => 'blockchain::parity::ethpoller::mode::tracking'
    );
    $self->{custom_modes}{api} = 'blockchain::parity::ethpoller::custom::api';
    return $self;
}

1;

__END__

=head1 PLUGIN DESCRIPTION

Check Parity blockchain accounts, contracts and forks from eth-poller with HTTP GET requests

=cut


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:lang="http://www.springframework.org/schema/lang"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/lang
       http://www.springframework.org/schema/lang/spring-lang.xsd">

    <bean name="MessageXML" class="org.sifassociation.messaging.SIF2MessageXML"/>

<!--
    <lang:jruby id="ClassicMessages"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/ClassicMessages.rb">
    </lang:jruby>

    <lang:jruby id="XQuery"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/XQuery.rb">
    </lang:jruby>

    <bean name="US26Collection" class="org.sifassociation.querying.EXistXQuery">
        <constructor-arg value="xmldb:exist://localhost:8079/exist/xmlrpc/db/US26" />
    </bean>

    <lang:jruby id="XQueryCSQ"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/XQueryCSQs.rb">
    </lang:jruby>

    <bean name="CSQsCollection" class="org.sifassociation.querying.EXistXQuery">
        <constructor-arg value="xmldb:exist://localhost:8080/exist/xmlrpc/db/csq" />
    </bean>

    <lang:jruby id="Payloads"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/Payloads.rb">
    </lang:jruby>

    <lang:jruby id="Edits"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/Edits.rb">
    </lang:jruby>

    <lang:jruby id="SIF3Payloads"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/SIF3Payloads.rb">
    </lang:jruby>
-->

    <lang:jruby id="ExampleIds"
        script-interfaces="org.sifassociation.testing.IScriptHooks"
        script-source="resources/scripts/ExampleRefIds.rb">
    </lang:jruby>

</beans>