Source Code Cross Referenced for ContentHostingService.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » content » cover » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.content.cover 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /**********************************************************************************
0002:         * $URL: https://source.sakaiproject.org/svn/content/tags/sakai_2-4-1/content-api/api/src/java/org/sakaiproject/content/cover/ContentHostingService.java $
0003:         * $Id: ContentHostingService.java 22758 2007-03-16 16:26:00Z john.ellis@rsmart.com $
0004:         ***********************************************************************************
0005:         *
0006:         * Copyright (c) 2003, 2004, 2005, 2006, 2007 The Sakai Foundation.
0007:         * 
0008:         * Licensed under the Educational Community License, Version 1.0 (the "License"); 
0009:         * you may not use this file except in compliance with the License. 
0010:         * You may obtain a copy of the License at
0011:         * 
0012:         *      http://www.opensource.org/licenses/ecl1.php
0013:         * 
0014:         * Unless required by applicable law or agreed to in writing, software 
0015:         * distributed under the License is distributed on an "AS IS" BASIS, 
0016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
0017:         * See the License for the specific language governing permissions and 
0018:         * limitations under the License.
0019:         *
0020:         **********************************************************************************/package org.sakaiproject.content.cover;
0021:
0022:        import org.sakaiproject.component.cover.ComponentManager;
0023:        import org.sakaiproject.exception.TypeException;
0024:
0025:        /**
0026:         * <p>
0027:         * ContentHostingService is a static Cover for the {@link org.sakaiproject.content.api.ContentHostingService ContentHostingService}; see that interface for usage details.
0028:         * </p>
0029:         */
0030:        public class ContentHostingService {
0031:            /**
0032:             * Access the component instance: special cover only method.
0033:             * 
0034:             * @return the component instance.
0035:             */
0036:            public static org.sakaiproject.content.api.ContentHostingService getInstance() {
0037:                if (ComponentManager.CACHE_COMPONENTS) {
0038:                    if (m_instance == null)
0039:                        m_instance = (org.sakaiproject.content.api.ContentHostingService) ComponentManager
0040:                                .get(org.sakaiproject.content.api.ContentHostingService.class);
0041:                    return m_instance;
0042:                } else {
0043:                    return (org.sakaiproject.content.api.ContentHostingService) ComponentManager
0044:                            .get(org.sakaiproject.content.api.ContentHostingService.class);
0045:                }
0046:            }
0047:
0048:            private static org.sakaiproject.content.api.ContentHostingService m_instance = null;
0049:
0050:            public static java.lang.String APPLICATION_ID = org.sakaiproject.content.api.ContentHostingService.APPLICATION_ID;
0051:
0052:            public static java.lang.String REFERENCE_ROOT = org.sakaiproject.content.api.ContentHostingService.REFERENCE_ROOT;
0053:
0054:            public static java.lang.String EVENT_RESOURCE_ADD = org.sakaiproject.content.api.ContentHostingService.EVENT_RESOURCE_ADD;
0055:
0056:            public static java.lang.String EVENT_RESOURCE_READ = org.sakaiproject.content.api.ContentHostingService.EVENT_RESOURCE_READ;
0057:
0058:            public static java.lang.String EVENT_RESOURCE_WRITE = org.sakaiproject.content.api.ContentHostingService.EVENT_RESOURCE_WRITE;
0059:
0060:            public static java.lang.String EVENT_RESOURCE_REMOVE = org.sakaiproject.content.api.ContentHostingService.EVENT_RESOURCE_REMOVE;
0061:
0062:            public static java.lang.String AUTH_RESOURCE_ADD = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_ADD;
0063:            public static java.lang.String AUTH_RESOURCE_READ = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_READ;
0064:            public static java.lang.String AUTH_RESOURCE_WRITE_ANY = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_WRITE_ANY;
0065:            public static java.lang.String AUTH_RESOURCE_WRITE_OWN = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_WRITE_OWN;
0066:            public static java.lang.String AUTH_RESOURCE_REMOVE_ANY = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_REMOVE_ANY;
0067:            public static java.lang.String AUTH_RESOURCE_REMOVE_OWN = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_REMOVE_OWN;
0068:            public static java.lang.String AUTH_RESOURCE_ALL_GROUPS = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_ALL_GROUPS;
0069:            public static java.lang.String AUTH_GROUP_RESOURCE_READ = org.sakaiproject.content.api.ContentHostingService.AUTH_GROUP_RESOURCE_READ;
0070:            public static java.lang.String AUTH_RESOURCE_HIDDEN = org.sakaiproject.content.api.ContentHostingService.AUTH_RESOURCE_HIDDEN;
0071:            public static java.lang.String AUTH_DROPBOX_OWN = org.sakaiproject.content.api.ContentHostingService.AUTH_DROPBOX_OWN;
0072:            public static java.lang.String AUTH_DROPBOX_MAINTAIN = org.sakaiproject.content.api.ContentHostingService.AUTH_DROPBOX_MAINTAIN;
0073:
0074:            public static java.lang.String PROP_ALTERNATE_REFERENCE = org.sakaiproject.content.api.ContentHostingService.PROP_ALTERNATE_REFERENCE;
0075:
0076:            public static int MAXIMUM_RESOURCE_ID_LENGTH = org.sakaiproject.content.api.ContentHostingService.MAXIMUM_RESOURCE_ID_LENGTH;
0077:
0078:            public static java.lang.String getUrl(java.lang.String param0) {
0079:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0080:                if (service == null)
0081:                    return null;
0082:
0083:                return service.getUrl(param0);
0084:            }
0085:
0086:            public static java.lang.String getUrl(java.lang.String param0,
0087:                    java.lang.String param1) {
0088:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0089:                if (service == null)
0090:                    return null;
0091:
0092:                return service.getUrl(param0, param1);
0093:            }
0094:
0095:            /**
0096:             * @param id
0097:             *        id of the resource to set the UUID for
0098:             * @param uuid
0099:             *        the new UUID of the resource
0100:             * @throws org.sakaiproject.exception.IdInvalidException
0101:             *         if the given resource already has a UUID set
0102:             */
0103:            public static void setUuid(java.lang.String id,
0104:                    java.lang.String uuid)
0105:                    throws org.sakaiproject.exception.IdInvalidException {
0106:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0107:                if (service == null)
0108:                    return;
0109:
0110:                service.setUuid(id, uuid);
0111:            }
0112:
0113:            public static java.lang.String getReference(java.lang.String param0) {
0114:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0115:                if (service == null)
0116:                    return null;
0117:
0118:                return service.getReference(param0);
0119:            }
0120:
0121:            public static org.sakaiproject.content.api.ContentCollection getCollection(
0122:                    java.lang.String param0)
0123:                    throws org.sakaiproject.exception.IdUnusedException,
0124:                    org.sakaiproject.exception.TypeException,
0125:                    org.sakaiproject.exception.PermissionException {
0126:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0127:                if (service == null)
0128:                    return null;
0129:
0130:                return service.getCollection(param0);
0131:            }
0132:
0133:            public static boolean allowAddCollection(java.lang.String param0) {
0134:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0135:                if (service == null)
0136:                    return false;
0137:
0138:                return service.allowAddCollection(param0);
0139:            }
0140:
0141:            /**
0142:             * @param param0
0143:             * @param param1
0144:             * @return
0145:             * @throws org.sakaiproject.exception.IdUsedException
0146:             * @throws org.sakaiproject.exception.IdInvalidException
0147:             * @throws org.sakaiproject.exception.PermissionException
0148:             * @throws org.sakaiproject.exception.InconsistentException
0149:             * @deprecated Suggest use of {@link #addCollection(String)} followed by {@link #Edit.getPropertiesEdit()},
0150:             * 		and {@link #commitCollection(ContentCollectionEdit)}
0151:             */
0152:            public static org.sakaiproject.content.api.ContentCollection addCollection(
0153:                    java.lang.String param0,
0154:                    org.sakaiproject.entity.api.ResourceProperties param1)
0155:                    throws org.sakaiproject.exception.IdUsedException,
0156:                    org.sakaiproject.exception.IdInvalidException,
0157:                    org.sakaiproject.exception.PermissionException,
0158:                    org.sakaiproject.exception.InconsistentException {
0159:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0160:                if (service == null)
0161:                    return null;
0162:
0163:                return service.addCollection(param0, param1);
0164:            }
0165:
0166:            /**
0167:             * 
0168:             * @param param0
0169:             * @param param1
0170:             * @param param2
0171:             * @param param3
0172:             * @param param4
0173:             * @param param5
0174:             * @return
0175:             * @throws org.sakaiproject.exception.IdUsedException
0176:             * @throws org.sakaiproject.exception.IdInvalidException
0177:             * @throws org.sakaiproject.exception.PermissionException
0178:             * @throws org.sakaiproject.exception.InconsistentException
0179:             * @deprecated Suggest use of {@link #addCollection(String)} followed by {@link #Edit.getPropertiesEdit()},
0180:             * 		{@link #GroupAwareEdit.setGroupAccess(Collection)}, {@link #GroupAwareEdit.setAvailability(boolean, Time, Time)} 
0181:             * 		and {@link #commitCollection(ContentCollectionEdit)}
0182:             */
0183:            public static org.sakaiproject.content.api.ContentCollection addCollection(
0184:                    java.lang.String param0,
0185:                    org.sakaiproject.entity.api.ResourceProperties param1,
0186:                    java.util.Collection param2, boolean param3,
0187:                    org.sakaiproject.time.api.Time param4,
0188:                    org.sakaiproject.time.api.Time param5)
0189:                    throws org.sakaiproject.exception.IdUsedException,
0190:                    org.sakaiproject.exception.IdInvalidException,
0191:                    org.sakaiproject.exception.PermissionException,
0192:                    org.sakaiproject.exception.InconsistentException {
0193:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0194:                if (service == null)
0195:                    return null;
0196:
0197:                return service.addCollection(param0, param1, param2, param3,
0198:                        param4, param5);
0199:            }
0200:
0201:            public static org.sakaiproject.content.api.ContentCollectionEdit addCollection(
0202:                    java.lang.String param0)
0203:                    throws org.sakaiproject.exception.IdUsedException,
0204:                    org.sakaiproject.exception.IdInvalidException,
0205:                    org.sakaiproject.exception.PermissionException,
0206:                    org.sakaiproject.exception.InconsistentException {
0207:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0208:                if (service == null)
0209:                    return null;
0210:
0211:                return service.addCollection(param0);
0212:            }
0213:
0214:            public static boolean allowGetCollection(java.lang.String param0) {
0215:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0216:                if (service == null)
0217:                    return false;
0218:
0219:                return service.allowGetCollection(param0);
0220:            }
0221:
0222:            public static void checkCollection(java.lang.String param0)
0223:                    throws org.sakaiproject.exception.IdUnusedException,
0224:                    org.sakaiproject.exception.TypeException,
0225:                    org.sakaiproject.exception.PermissionException {
0226:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0227:                if (service == null)
0228:                    return;
0229:
0230:                service.checkCollection(param0);
0231:            }
0232:
0233:            public static java.util.List getAllResources(java.lang.String param0) {
0234:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0235:                if (service == null)
0236:                    return null;
0237:
0238:                return service.getAllResources(param0);
0239:            }
0240:
0241:            public static java.util.List getAllEntities(java.lang.String param0) {
0242:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0243:                if (service == null)
0244:                    return null;
0245:
0246:                return service.getAllEntities(param0);
0247:            }
0248:
0249:            public static boolean allowUpdateCollection(java.lang.String param0) {
0250:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0251:                if (service == null)
0252:                    return false;
0253:
0254:                return service.allowUpdateCollection(param0);
0255:            }
0256:
0257:            public static org.sakaiproject.content.api.ContentCollectionEdit editCollection(
0258:                    java.lang.String param0)
0259:                    throws org.sakaiproject.exception.IdUnusedException,
0260:                    org.sakaiproject.exception.TypeException,
0261:                    org.sakaiproject.exception.PermissionException,
0262:                    org.sakaiproject.exception.InUseException {
0263:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0264:                if (service == null)
0265:                    return null;
0266:
0267:                return service.editCollection(param0);
0268:            }
0269:
0270:            public static boolean allowRemoveCollection(java.lang.String param0) {
0271:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0272:                if (service == null)
0273:                    return false;
0274:
0275:                return service.allowRemoveCollection(param0);
0276:            }
0277:
0278:            public static void removeCollection(
0279:                    org.sakaiproject.content.api.ContentCollectionEdit param0)
0280:                    throws org.sakaiproject.exception.TypeException,
0281:                    org.sakaiproject.exception.PermissionException,
0282:                    org.sakaiproject.exception.InconsistentException,
0283:                    org.sakaiproject.exception.ServerOverloadException {
0284:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0285:                if (service == null)
0286:                    return;
0287:
0288:                service.removeCollection(param0);
0289:            }
0290:
0291:            public static void removeCollection(java.lang.String param0)
0292:                    throws org.sakaiproject.exception.IdUnusedException,
0293:                    org.sakaiproject.exception.TypeException,
0294:                    org.sakaiproject.exception.PermissionException,
0295:                    org.sakaiproject.exception.InUseException,
0296:                    org.sakaiproject.exception.ServerOverloadException {
0297:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0298:                if (service == null)
0299:                    return;
0300:
0301:                service.removeCollection(param0);
0302:            }
0303:
0304:            public static void commitCollection(
0305:                    org.sakaiproject.content.api.ContentCollectionEdit param0) {
0306:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0307:                if (service == null)
0308:                    return;
0309:
0310:                service.commitCollection(param0);
0311:            }
0312:
0313:            public static void cancelCollection(
0314:                    org.sakaiproject.content.api.ContentCollectionEdit param0) {
0315:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0316:                if (service == null)
0317:                    return;
0318:
0319:                service.cancelCollection(param0);
0320:            }
0321:
0322:            public static boolean allowAddResource(java.lang.String param0) {
0323:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0324:                if (service == null)
0325:                    return false;
0326:
0327:                return service.allowAddResource(param0);
0328:            }
0329:
0330:            public static org.sakaiproject.content.api.ContentResource addResource(
0331:                    java.lang.String param0, java.lang.String param1,
0332:                    byte[] param2,
0333:                    org.sakaiproject.entity.api.ResourceProperties param3,
0334:                    int param4)
0335:                    throws org.sakaiproject.exception.PermissionException,
0336:                    org.sakaiproject.exception.IdUsedException,
0337:                    org.sakaiproject.exception.IdInvalidException,
0338:                    org.sakaiproject.exception.InconsistentException,
0339:                    org.sakaiproject.exception.OverQuotaException,
0340:                    org.sakaiproject.exception.ServerOverloadException {
0341:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0342:                if (service == null)
0343:                    return null;
0344:
0345:                return service.addResource(param0, param1, param2, param3,
0346:                        param4);
0347:            }
0348:
0349:            public static org.sakaiproject.content.api.ContentResource addResource(
0350:                    java.lang.String param0, java.lang.String param1,
0351:                    int param2, java.lang.String param3, byte[] param4,
0352:                    org.sakaiproject.entity.api.ResourceProperties param5,
0353:                    int param6)
0354:                    throws org.sakaiproject.exception.PermissionException,
0355:                    org.sakaiproject.exception.IdInvalidException,
0356:                    org.sakaiproject.exception.InconsistentException,
0357:                    org.sakaiproject.exception.OverQuotaException,
0358:                    org.sakaiproject.exception.ServerOverloadException,
0359:                    org.sakaiproject.exception.IdUniquenessException,
0360:                    org.sakaiproject.exception.IdLengthException {
0361:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0362:                if (service == null)
0363:                    return null;
0364:
0365:                return service.addResource(param0, param1, param2, param3,
0366:                        param4, param5, param6);
0367:            }
0368:
0369:            public static org.sakaiproject.content.api.ContentResource addResource(
0370:                    java.lang.String param0, java.lang.String param1,
0371:                    byte[] param2,
0372:                    org.sakaiproject.entity.api.ResourceProperties param3,
0373:                    java.util.Collection param4, int param5)
0374:                    throws org.sakaiproject.exception.PermissionException,
0375:                    org.sakaiproject.exception.IdUsedException,
0376:                    org.sakaiproject.exception.IdInvalidException,
0377:                    org.sakaiproject.exception.InconsistentException,
0378:                    org.sakaiproject.exception.OverQuotaException,
0379:                    org.sakaiproject.exception.ServerOverloadException {
0380:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0381:                if (service == null)
0382:                    return null;
0383:
0384:                return service.addResource(param0, param1, param2, param3,
0385:                        param4, param5);
0386:            }
0387:
0388:            public static org.sakaiproject.content.api.ContentResource addResource(
0389:                    java.lang.String param0, java.lang.String param1,
0390:                    int param2, java.lang.String param3, byte[] param4,
0391:                    org.sakaiproject.entity.api.ResourceProperties param5,
0392:                    java.util.Collection param6, boolean param7,
0393:                    org.sakaiproject.time.api.Time param8,
0394:                    org.sakaiproject.time.api.Time param9, int param10)
0395:                    throws org.sakaiproject.exception.PermissionException,
0396:                    org.sakaiproject.exception.IdInvalidException,
0397:                    org.sakaiproject.exception.InconsistentException,
0398:                    org.sakaiproject.exception.OverQuotaException,
0399:                    org.sakaiproject.exception.ServerOverloadException,
0400:                    org.sakaiproject.exception.IdUniquenessException,
0401:                    org.sakaiproject.exception.IdLengthException {
0402:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0403:                if (service == null)
0404:                    return null;
0405:
0406:                return service
0407:                        .addResource(param0, param1, param2, param3, param4,
0408:                                param5, param6, param7, param8, param9, param10);
0409:            }
0410:
0411:            public static org.sakaiproject.content.api.ContentResourceEdit addResource(
0412:                    java.lang.String param0)
0413:                    throws org.sakaiproject.exception.PermissionException,
0414:                    org.sakaiproject.exception.IdUsedException,
0415:                    org.sakaiproject.exception.IdInvalidException,
0416:                    org.sakaiproject.exception.InconsistentException,
0417:                    org.sakaiproject.exception.ServerOverloadException {
0418:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0419:                if (service == null)
0420:                    return null;
0421:
0422:                return service.addResource(param0);
0423:            }
0424:
0425:            public static boolean allowAddAttachmentResource() {
0426:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0427:                if (service == null)
0428:                    return false;
0429:
0430:                return service.allowAddAttachmentResource();
0431:            }
0432:
0433:            public static boolean isAttachmentResource(java.lang.String param0) {
0434:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0435:                if (service == null)
0436:                    return false;
0437:
0438:                return service.isAttachmentResource(param0);
0439:            }
0440:
0441:            public static org.sakaiproject.content.api.ContentResource addAttachmentResource(
0442:                    java.lang.String param0, java.lang.String param1,
0443:                    byte[] param2,
0444:                    org.sakaiproject.entity.api.ResourceProperties param3)
0445:                    throws org.sakaiproject.exception.IdInvalidException,
0446:                    org.sakaiproject.exception.InconsistentException,
0447:                    org.sakaiproject.exception.IdUsedException,
0448:                    org.sakaiproject.exception.PermissionException,
0449:                    org.sakaiproject.exception.OverQuotaException,
0450:                    org.sakaiproject.exception.ServerOverloadException {
0451:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0452:                if (service == null)
0453:                    return null;
0454:
0455:                return service.addAttachmentResource(param0, param1, param2,
0456:                        param3);
0457:            }
0458:
0459:            public static org.sakaiproject.content.api.ContentResource addAttachmentResource(
0460:                    java.lang.String param0, java.lang.String param1,
0461:                    java.lang.String param2, java.lang.String param3,
0462:                    byte[] param4,
0463:                    org.sakaiproject.entity.api.ResourceProperties param5)
0464:                    throws org.sakaiproject.exception.IdInvalidException,
0465:                    org.sakaiproject.exception.InconsistentException,
0466:                    org.sakaiproject.exception.IdUsedException,
0467:                    org.sakaiproject.exception.PermissionException,
0468:                    org.sakaiproject.exception.OverQuotaException,
0469:                    org.sakaiproject.exception.ServerOverloadException {
0470:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0471:                if (service == null)
0472:                    return null;
0473:
0474:                return service.addAttachmentResource(param0, param1, param2,
0475:                        param3, param4, param5);
0476:            }
0477:
0478:            public static org.sakaiproject.content.api.ContentResourceEdit addAttachmentResource(
0479:                    java.lang.String param0)
0480:                    throws org.sakaiproject.exception.IdInvalidException,
0481:                    org.sakaiproject.exception.InconsistentException,
0482:                    org.sakaiproject.exception.IdUsedException,
0483:                    org.sakaiproject.exception.PermissionException,
0484:                    org.sakaiproject.exception.ServerOverloadException {
0485:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0486:                if (service == null)
0487:                    return null;
0488:
0489:                return service.addAttachmentResource(param0);
0490:            }
0491:
0492:            public static boolean allowUpdateResource(java.lang.String param0) {
0493:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0494:                if (service == null)
0495:                    return false;
0496:
0497:                return service.allowUpdateResource(param0);
0498:            }
0499:
0500:            public static org.sakaiproject.content.api.ContentResource updateResource(
0501:                    java.lang.String param0, java.lang.String param1,
0502:                    byte[] param2)
0503:                    throws org.sakaiproject.exception.PermissionException,
0504:                    org.sakaiproject.exception.IdUnusedException,
0505:                    org.sakaiproject.exception.TypeException,
0506:                    org.sakaiproject.exception.InUseException,
0507:                    org.sakaiproject.exception.OverQuotaException,
0508:                    org.sakaiproject.exception.ServerOverloadException {
0509:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0510:                if (service == null)
0511:                    return null;
0512:
0513:                return service.updateResource(param0, param1, param2);
0514:            }
0515:
0516:            public static org.sakaiproject.content.api.ContentResourceEdit editResource(
0517:                    java.lang.String param0)
0518:                    throws org.sakaiproject.exception.PermissionException,
0519:                    org.sakaiproject.exception.IdUnusedException,
0520:                    org.sakaiproject.exception.TypeException,
0521:                    org.sakaiproject.exception.InUseException {
0522:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0523:                if (service == null)
0524:                    return null;
0525:
0526:                return service.editResource(param0);
0527:            }
0528:
0529:            public static boolean allowGetResource(java.lang.String param0) {
0530:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0531:                if (service == null)
0532:                    return false;
0533:
0534:                return service.allowGetResource(param0);
0535:            }
0536:
0537:            public static boolean allowRemoveResource(java.lang.String param0) {
0538:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0539:                if (service == null)
0540:                    return false;
0541:
0542:                return service.allowRemoveResource(param0);
0543:            }
0544:
0545:            public static void removeResource(
0546:                    org.sakaiproject.content.api.ContentResourceEdit param0)
0547:                    throws org.sakaiproject.exception.PermissionException {
0548:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0549:                if (service == null)
0550:                    return;
0551:
0552:                service.removeResource(param0);
0553:            }
0554:
0555:            public static void removeResource(java.lang.String param0)
0556:                    throws org.sakaiproject.exception.PermissionException,
0557:                    org.sakaiproject.exception.IdUnusedException,
0558:                    org.sakaiproject.exception.TypeException,
0559:                    org.sakaiproject.exception.InUseException {
0560:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0561:                if (service == null)
0562:                    return;
0563:
0564:                service.removeResource(param0);
0565:            }
0566:
0567:            public static boolean allowRename(java.lang.String param0,
0568:                    java.lang.String param1) {
0569:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0570:                if (service == null)
0571:                    return false;
0572:
0573:                return service.allowRename(param0, param1);
0574:            }
0575:
0576:            public static boolean allowCopy(java.lang.String param0,
0577:                    java.lang.String param1) {
0578:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0579:                if (service == null)
0580:                    return false;
0581:
0582:                return service.allowCopy(param0, param1);
0583:            }
0584:
0585:            public static void commitResource(
0586:                    org.sakaiproject.content.api.ContentResourceEdit param0)
0587:                    throws org.sakaiproject.exception.OverQuotaException,
0588:                    org.sakaiproject.exception.ServerOverloadException {
0589:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0590:                if (service == null)
0591:                    return;
0592:
0593:                service.commitResource(param0);
0594:            }
0595:
0596:            public static void commitResource(
0597:                    org.sakaiproject.content.api.ContentResourceEdit param0,
0598:                    int param1)
0599:                    throws org.sakaiproject.exception.OverQuotaException,
0600:                    org.sakaiproject.exception.ServerOverloadException {
0601:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0602:                if (service == null)
0603:                    return;
0604:
0605:                service.commitResource(param0, param1);
0606:            }
0607:
0608:            public static void cancelResource(
0609:                    org.sakaiproject.content.api.ContentResourceEdit param0) {
0610:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0611:                if (service == null)
0612:                    return;
0613:
0614:                service.cancelResource(param0);
0615:            }
0616:
0617:            public static boolean allowGetProperties(java.lang.String param0) {
0618:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0619:                if (service == null)
0620:                    return false;
0621:
0622:                return service.allowGetProperties(param0);
0623:            }
0624:
0625:            public static boolean allowAddProperty(java.lang.String param0) {
0626:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0627:                if (service == null)
0628:                    return false;
0629:
0630:                return service.allowAddProperty(param0);
0631:            }
0632:
0633:            public static org.sakaiproject.entity.api.ResourceProperties addProperty(
0634:                    java.lang.String param0, java.lang.String param1,
0635:                    java.lang.String param2)
0636:                    throws org.sakaiproject.exception.PermissionException,
0637:                    org.sakaiproject.exception.IdUnusedException,
0638:                    org.sakaiproject.exception.TypeException,
0639:                    org.sakaiproject.exception.InUseException,
0640:                    org.sakaiproject.exception.ServerOverloadException {
0641:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0642:                if (service == null)
0643:                    return null;
0644:
0645:                return service.addProperty(param0, param1, param2);
0646:            }
0647:
0648:            public static boolean allowRemoveProperty(java.lang.String param0) {
0649:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0650:                if (service == null)
0651:                    return false;
0652:
0653:                return service.allowRemoveProperty(param0);
0654:            }
0655:
0656:            public static org.sakaiproject.entity.api.ResourceProperties removeProperty(
0657:                    java.lang.String param0, java.lang.String param1)
0658:                    throws org.sakaiproject.exception.PermissionException,
0659:                    org.sakaiproject.exception.IdUnusedException,
0660:                    org.sakaiproject.exception.TypeException,
0661:                    org.sakaiproject.exception.InUseException,
0662:                    org.sakaiproject.exception.ServerOverloadException {
0663:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0664:                if (service == null)
0665:                    return null;
0666:
0667:                return service.removeProperty(param0, param1);
0668:            }
0669:
0670:            public static java.lang.String getContainingCollectionId(
0671:                    java.lang.String param0) {
0672:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0673:                if (service == null)
0674:                    return null;
0675:
0676:                return service.getContainingCollectionId(param0);
0677:            }
0678:
0679:            public static boolean isRootCollection(java.lang.String param0) {
0680:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0681:                if (service == null)
0682:                    return false;
0683:
0684:                return service.isRootCollection(param0);
0685:            }
0686:
0687:            public static org.sakaiproject.entity.api.ResourcePropertiesEdit newResourceProperties() {
0688:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0689:                if (service == null)
0690:                    return null;
0691:
0692:                return service.newResourceProperties();
0693:            }
0694:
0695:            public static java.lang.String getSiteCollection(
0696:                    java.lang.String param0) {
0697:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0698:                if (service == null)
0699:                    return null;
0700:
0701:                return service.getSiteCollection(param0);
0702:            }
0703:
0704:            public static java.lang.String archiveResources(
0705:                    java.util.List param0, org.w3c.dom.Document param1,
0706:                    java.util.Stack param2, java.lang.String param3) {
0707:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0708:                if (service == null)
0709:                    return null;
0710:
0711:                return service.archiveResources(param0, param1, param2, param3);
0712:            }
0713:
0714:            public static org.sakaiproject.content.api.ContentResource getResource(
0715:                    java.lang.String param0)
0716:                    throws org.sakaiproject.exception.PermissionException,
0717:                    org.sakaiproject.exception.IdUnusedException,
0718:                    org.sakaiproject.exception.TypeException {
0719:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0720:                if (service == null)
0721:                    return null;
0722:
0723:                return service.getResource(param0);
0724:            }
0725:
0726:            public static org.sakaiproject.entity.api.ResourceProperties getProperties(
0727:                    java.lang.String param0)
0728:                    throws org.sakaiproject.exception.PermissionException,
0729:                    org.sakaiproject.exception.IdUnusedException {
0730:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0731:                if (service == null)
0732:                    return null;
0733:
0734:                return service.getProperties(param0);
0735:            }
0736:
0737:            public static String copy(java.lang.String param0,
0738:                    java.lang.String param1)
0739:                    throws org.sakaiproject.exception.PermissionException,
0740:                    org.sakaiproject.exception.IdUnusedException,
0741:                    org.sakaiproject.exception.TypeException,
0742:                    org.sakaiproject.exception.InUseException,
0743:                    org.sakaiproject.exception.OverQuotaException,
0744:                    org.sakaiproject.exception.IdUsedException,
0745:                    org.sakaiproject.exception.ServerOverloadException {
0746:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0747:                if (service == null)
0748:                    return null;
0749:
0750:                return service.copy(param0, param1);
0751:            }
0752:
0753:            public static String copyIntoFolder(java.lang.String param0,
0754:                    java.lang.String param1)
0755:                    throws org.sakaiproject.exception.PermissionException,
0756:                    org.sakaiproject.exception.IdUnusedException,
0757:                    org.sakaiproject.exception.IdLengthException,
0758:                    org.sakaiproject.exception.IdUniquenessException,
0759:                    org.sakaiproject.exception.TypeException,
0760:                    org.sakaiproject.exception.InUseException,
0761:                    org.sakaiproject.exception.OverQuotaException,
0762:                    org.sakaiproject.exception.IdUsedException,
0763:                    org.sakaiproject.exception.ServerOverloadException,
0764:                    org.sakaiproject.exception.InconsistentException {
0765:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0766:                if (service == null)
0767:                    return null;
0768:
0769:                return service.copyIntoFolder(param0, param1);
0770:            }
0771:
0772:            public static void moveIntoFolder(java.lang.String param0,
0773:                    java.lang.String param1)
0774:                    throws org.sakaiproject.exception.PermissionException,
0775:                    org.sakaiproject.exception.IdUnusedException,
0776:                    org.sakaiproject.exception.TypeException,
0777:                    org.sakaiproject.exception.InUseException,
0778:                    org.sakaiproject.exception.OverQuotaException,
0779:                    org.sakaiproject.exception.IdUsedException,
0780:                    org.sakaiproject.exception.InconsistentException,
0781:                    org.sakaiproject.exception.ServerOverloadException {
0782:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0783:                if (service == null)
0784:                    return;
0785:
0786:                service.moveIntoFolder(param0, param1);
0787:            }
0788:
0789:            public static void rename(java.lang.String param0,
0790:                    java.lang.String param1)
0791:                    throws org.sakaiproject.exception.PermissionException,
0792:                    org.sakaiproject.exception.IdUnusedException,
0793:                    org.sakaiproject.exception.TypeException,
0794:                    org.sakaiproject.exception.InUseException,
0795:                    org.sakaiproject.exception.OverQuotaException,
0796:                    org.sakaiproject.exception.InconsistentException,
0797:                    org.sakaiproject.exception.IdUsedException,
0798:                    org.sakaiproject.exception.ServerOverloadException {
0799:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0800:                if (service == null)
0801:                    return;
0802:
0803:                service.rename(param0, param1);
0804:            }
0805:
0806:            public static void checkResource(java.lang.String param0)
0807:                    throws org.sakaiproject.exception.PermissionException,
0808:                    org.sakaiproject.exception.IdUnusedException,
0809:                    org.sakaiproject.exception.TypeException {
0810:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0811:                if (service == null)
0812:                    return;
0813:
0814:                service.checkResource(param0);
0815:            }
0816:
0817:            public static int getDepth(java.lang.String param0,
0818:                    java.lang.String param1) {
0819:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0820:                if (service == null)
0821:                    return 0;
0822:
0823:                return service.getDepth(param0, param1);
0824:            }
0825:
0826:            public static java.lang.String merge(java.lang.String param0,
0827:                    org.w3c.dom.Element param1, java.lang.String param2,
0828:                    java.lang.String param3, java.util.Map param4,
0829:                    java.util.HashMap param5, java.util.Set param6) {
0830:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0831:                if (service == null)
0832:                    return null;
0833:
0834:                return service.merge(param0, param1, param2, param3, param4,
0835:                        param5, param6);
0836:            }
0837:
0838:            public static java.lang.String getLabel() {
0839:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0840:                if (service == null)
0841:                    return null;
0842:
0843:                return service.getLabel();
0844:            }
0845:
0846:            public static java.lang.String archive(java.lang.String param0,
0847:                    org.w3c.dom.Document param1, java.util.Stack param2,
0848:                    java.lang.String param3, java.util.List param4) {
0849:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0850:                if (service == null)
0851:                    return null;
0852:
0853:                return service.archive(param0, param1, param2, param3, param4);
0854:            }
0855:
0856:            public static boolean isPubView(java.lang.String param0) {
0857:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0858:                if (service == null)
0859:                    return false;
0860:
0861:                return service.isPubView(param0);
0862:            }
0863:
0864:            public static boolean isInheritingPubView(java.lang.String param0) {
0865:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0866:                if (service == null)
0867:                    return false;
0868:
0869:                return service.isInheritingPubView(param0);
0870:            }
0871:
0872:            public static void setPubView(java.lang.String param0,
0873:                    boolean param1) {
0874:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0875:                if (service == null)
0876:                    return;
0877:
0878:                service.setPubView(param0, param1);
0879:            }
0880:
0881:            public static String getUuid(String id) {
0882:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0883:                if (service == null)
0884:                    return null;
0885:
0886:                return service.getUuid(id);
0887:            }
0888:
0889:            public static String resolveUuid(String uuid) {
0890:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0891:                if (service == null)
0892:                    return null;
0893:
0894:                return service.resolveUuid(uuid);
0895:            }
0896:
0897:            public static java.util.Collection getLocks(String id) {
0898:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0899:                if (service == null)
0900:                    return null;
0901:
0902:                return service.getLocks(id);
0903:            }
0904:
0905:            public static void lockObject(String id, String lockId,
0906:                    String subject, boolean system) {
0907:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0908:                if (service == null)
0909:                    return;
0910:
0911:                service.lockObject(id, lockId, subject, system);
0912:            }
0913:
0914:            public static void removeLock(String id, String lockId) {
0915:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0916:                if (service == null)
0917:                    return;
0918:
0919:                service.removeLock(id, lockId);
0920:            }
0921:
0922:            public static boolean isLocked(String id) {
0923:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0924:                if (service == null)
0925:                    return false;
0926:
0927:                return service.isLocked(id);
0928:            }
0929:
0930:            public static boolean containsLockedNode(String id) {
0931:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0932:                if (service == null)
0933:                    return false;
0934:
0935:                return service.containsLockedNode(id);
0936:            }
0937:
0938:            public static void removeAllLocks(String id) {
0939:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0940:                if (service == null)
0941:                    return;
0942:
0943:                service.removeAllLocks(id);
0944:            }
0945:
0946:            public static java.util.List findResources(String type,
0947:                    String primaryMimeType, String subMimeType) {
0948:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0949:                if (service == null)
0950:                    return null;
0951:
0952:                return service
0953:                        .findResources(type, primaryMimeType, subMimeType);
0954:            }
0955:
0956:            public static java.util.Map getCollectionMap() {
0957:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0958:                if (service == null)
0959:                    return null;
0960:
0961:                return service.getCollectionMap();
0962:            }
0963:
0964:            public static void eliminateDuplicates(java.util.Collection param) {
0965:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0966:                if (service == null)
0967:                    return;
0968:
0969:                service.eliminateDuplicates(param);
0970:            }
0971:
0972:            public static void createDropboxCollection() {
0973:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0974:                if (service == null)
0975:                    return;
0976:
0977:                service.createDropboxCollection();
0978:            }
0979:
0980:            public static void createDropboxCollection(java.lang.String param0) {
0981:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0982:                if (service == null)
0983:                    return;
0984:
0985:                service.createDropboxCollection(param0);
0986:            }
0987:
0988:            public static void createIndividualDropbox(java.lang.String param0) {
0989:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0990:                if (service == null)
0991:                    return;
0992:
0993:                service.createIndividualDropbox(param0);
0994:            }
0995:
0996:            public static java.lang.String getDropboxCollection() {
0997:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
0998:                if (service == null)
0999:                    return null;
1000:
1001:                return service.getDropboxCollection();
1002:            }
1003:
1004:            public static java.lang.String getDropboxCollection(
1005:                    java.lang.String param0) {
1006:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1007:                if (service == null)
1008:                    return null;
1009:
1010:                return service.getDropboxCollection(param0);
1011:            }
1012:
1013:            public static boolean isDropboxMaintainer() {
1014:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1015:                if (service == null)
1016:                    return false;
1017:
1018:                return service.isDropboxMaintainer();
1019:            }
1020:
1021:            public static boolean isDropboxMaintainer(java.lang.String param0) {
1022:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1023:                if (service == null)
1024:                    return false;
1025:
1026:                return service.isDropboxMaintainer(param0);
1027:            }
1028:
1029:            public static java.lang.String getDropboxDisplayName() {
1030:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1031:                if (service == null)
1032:                    return null;
1033:
1034:                return service.getDropboxDisplayName();
1035:            }
1036:
1037:            public static java.lang.String getDropboxDisplayName(
1038:                    java.lang.String param0) {
1039:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1040:                if (service == null)
1041:                    return null;
1042:
1043:                return service.getDropboxDisplayName(param0);
1044:            }
1045:
1046:            public static boolean isInDropbox(java.lang.String param0) {
1047:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1048:                if (service == null)
1049:                    return false;
1050:
1051:                return service.isInDropbox(param0);
1052:            }
1053:
1054:            public static java.util.Comparator newContentHostingComparator(
1055:                    java.lang.String param0, boolean param1) {
1056:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1057:                if (service == null)
1058:                    return null;
1059:
1060:                return service.newContentHostingComparator(param0, param1);
1061:            }
1062:
1063:            public static java.util.Collection getGroupsWithReadAccess(
1064:                    java.lang.String param0) {
1065:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1066:                if (service == null)
1067:                    return null;
1068:
1069:                return service.getGroupsWithReadAccess(param0);
1070:            }
1071:
1072:            // getGroupsWithRemovePermission
1073:            public static java.util.Collection getGroupsWithRemovePermission(
1074:                    java.lang.String param0) {
1075:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1076:                if (service == null)
1077:                    return null;
1078:
1079:                return service.getGroupsWithRemovePermission(param0);
1080:            }
1081:
1082:            public static java.util.Collection getGroupsWithAddPermission(
1083:                    java.lang.String param0) {
1084:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1085:                if (service == null)
1086:                    return null;
1087:
1088:                return service.getGroupsWithAddPermission(param0);
1089:            }
1090:
1091:            public static boolean isShortRefs() {
1092:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1093:                if (service == null)
1094:                    return false;
1095:
1096:                return service.isShortRefs();
1097:            }
1098:
1099:            public static boolean isAvailabilityEnabled() {
1100:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1101:                if (service == null)
1102:                    return false;
1103:
1104:                return service.isAvailabilityEnabled();
1105:            }
1106:
1107:            public static boolean isSortByPriorityEnabled() {
1108:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1109:                if (service == null)
1110:                    return false;
1111:
1112:                return service.isSortByPriorityEnabled();
1113:            }
1114:
1115:            public static boolean usingResourceTypeRegistry() {
1116:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1117:                if (service == null)
1118:                    return false;
1119:
1120:                return service.usingResourceTypeRegistry();
1121:            }
1122:
1123:            /**
1124:             * @param entityId
1125:             * @return
1126:             */
1127:            public static boolean isCollection(java.lang.String entityId) {
1128:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1129:                if (service == null)
1130:                    return false;
1131:
1132:                return service.isCollection(entityId);
1133:            }
1134:
1135:            public static org.sakaiproject.content.api.ContentResourceEdit addResource(
1136:                    java.lang.String collectionId, java.lang.String basename,
1137:                    java.lang.String extension, int maximum_tries)
1138:                    throws org.sakaiproject.exception.PermissionException,
1139:                    org.sakaiproject.exception.IdUniquenessException,
1140:                    org.sakaiproject.exception.IdLengthException,
1141:                    org.sakaiproject.exception.IdInvalidException,
1142:                    org.sakaiproject.exception.IdUnusedException,
1143:                    org.sakaiproject.exception.OverQuotaException,
1144:                    org.sakaiproject.exception.ServerOverloadException {
1145:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1146:                if (service == null)
1147:                    return null;
1148:
1149:                return service.addResource(collectionId, basename, extension,
1150:                        maximum_tries);
1151:            }
1152:
1153:            /**
1154:             * @param collectionId
1155:             * @param name
1156:             * @return
1157:             * @throws org.sakaiproject.exception.IdLengthException 
1158:             * @throws org.sakaiproject.exception.IdUnusedException 
1159:             * @throws org.sakaiproject.exception.TypeException 
1160:             */
1161:            public static org.sakaiproject.content.api.ContentCollectionEdit addCollection(
1162:                    java.lang.String collectionId, java.lang.String name)
1163:                    throws org.sakaiproject.exception.IdUsedException,
1164:                    org.sakaiproject.exception.IdInvalidException,
1165:                    org.sakaiproject.exception.PermissionException,
1166:                    org.sakaiproject.exception.IdUnusedException,
1167:                    org.sakaiproject.exception.IdLengthException,
1168:                    org.sakaiproject.exception.TypeException {
1169:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1170:                if (service == null)
1171:                    return null;
1172:
1173:                return service.addCollection(collectionId, name);
1174:            }
1175:
1176:            /**
1177:             * gets the quota for a site collection or for a user's my workspace collection
1178:             *
1179:             * @param collection the collection on which to test for a quota.  this can be the collection for a site
1180:             * or a user's workspace collection
1181:             * @return the quota in kb
1182:             */
1183:            public static long getQuota(
1184:                    org.sakaiproject.content.api.ContentCollection collection) {
1185:                org.sakaiproject.content.api.ContentHostingService service = getInstance();
1186:                if (service == null)
1187:                    return 0;
1188:
1189:                return service.getQuota(collection);
1190:            }
1191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.