vgritsenko 2004/05/17 09:17:11
Modified: src/java/org/apache/cocoon/transformation/pagination Pagesheet.java Paginator.java Log: Store.ROLE+"/TransientStore" -> Store.TRANSIENT_STORE Revision Changes Path 1.6 +9 -10 cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Pagesheet.java Index: Pagesheet.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Pagesheet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Pagesheet.java 17 May 2004 13:44:47 -0000 1.5 +++ Pagesheet.java 17 May 2004 16:17:11 -0000 1.6 @@ -1,12 +1,12 @@ /* * Copyright 1999-2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -98,7 +98,7 @@ */ public class Pagesheet extends DefaultHandler - implements Cloneable, Modifiable { + implements Cloneable, Modifiable { // Used only during parsing of pagesheet document private int level = 0; @@ -122,7 +122,6 @@ private int descendant = 0; private static class Page { - public int elementStart; public int elementEnd; public int characters; @@ -144,7 +143,6 @@ } private static class ItemList extends ArrayList { - public ItemList(int capacity) { super(capacity); } @@ -164,6 +162,7 @@ } } + public Pagesheet() { this.pages = new ResizableContainer(2); } @@ -216,7 +215,7 @@ case 2 : if (loc.equals("rules")) { - if (this.pageRules==null) { + if (this.pageRules == null) { this.pageRules = new ResizableContainer(2); } String key = a.getValue("page"); @@ -315,10 +314,10 @@ } public void endDocument() throws SAXException { - if (pageRules.size()==0) { + if (pageRules.size() == 0) { throw new SAXException("Pagesheet must contain at least a set of pagination rules."); } - if (pageRules.get(0)==null) { + if (pageRules.get(0) == null) { throw new SAXException("Pagesheet must contain the global pagination rules."); } } 1.6 +8 -7 cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Paginator.java Index: Paginator.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Paginator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Paginator.java 5 Mar 2004 13:03:00 -0000 1.5 +++ Paginator.java 17 May 2004 16:17:11 -0000 1.6 @@ -1,12 +1,12 @@ /* * Copyright 1999-2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -55,7 +55,7 @@ public static final String PAGINATE_URI = "http://apache.org/cocoon/paginate/1.0"; public static final String PAGINATE_PREFIX = "page"; - public static final String PAGINATE_PREFIX_TOKEN = PAGINATE_PREFIX+":"; + public static final String PAGINATE_PREFIX_TOKEN = PAGINATE_PREFIX + ":"; private ServiceManager manager; private SAXParser parser; @@ -82,8 +82,9 @@ this.manager = manager; getLogger().debug("Looking up "+SAXParser.ROLE); this.parser = (SAXParser) manager.lookup(SAXParser.ROLE); - getLogger().debug("Looking up "+Store.ROLE+"/TransientStore"); - this.store = (Store) manager.lookup(Store.ROLE+"/TransientStore"); + + getLogger().debug("Looking up " + Store.TRANSIENT_STORE); + this.store = (Store) manager.lookup(Store.TRANSIENT_STORE); } catch (Exception e) { getLogger().error("Could not find component", e); }