本文整理汇总了Java中org.wso2.carbon.registry.core.exceptions.RegistryException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java RegistryException.printStackTrace方法的具体用法?Java RegistryException.printStackTrace怎么用?Java RegistryException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wso2.carbon.registry.core.exceptions.RegistryException
的用法示例。
在下文中一共展示了RegistryException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: denotesPwc
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
/**
* @return <code>true</code> iff <code>versionName</code> is the name of private working copy.
* @see RegistryPrivateWorkingCopy#PWC_NAME
*/
public static boolean denotesPwc(Registry registry, String versionName) {
try {
Resource resource = registry.get(versionName);
String property = resource.getProperty(CMISConstants.GREG_CREATED_AS_PWC);
String checkedOut = resource.getProperty(CMISConstants.GREG_IS_CHECKED_OUT);
if(resource.getPath().endsWith(CMISConstants.PWC_SUFFIX) || ( property != null && property.equals("true") )
|| ( checkedOut != null && checkedOut.equals("true") )){
return true;
}
} catch (RegistryException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
return false;
}
示例2: copyGadgetResources
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
/**
* Copy default gadget resources (css, js, swf files,...etc)
* @param tenantRegistry Registry
*/
private void copyGadgetResources(Registry tenantRegistry) {
File gadgetsDir = new File(gadgetsDiskLocation);
if (gadgetsDir.exists()) {
try {
GadgetPopulator.beginFileTansfer(gadgetsDir, tenantRegistry);
} catch (RegistryException e) {
e.printStackTrace();
}
log.info("Successfully populated the default Gadgets.");
} else {
log.info("Couldn't find contents at '" + gadgetsDiskLocation +
"'. Giving up.");
}
}
开发者ID:wso2,项目名称:carbon-governance,代码行数:20,代码来源:DashboardPopulatorAxis2ConfigurationContextObserver.java
示例3: addVersionToHistory
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
private void addVersionToHistory(String nodePath, String nodeVersion) {
try {
String confPath = RegistryJCRSpecificStandardLoderUtil.
getSystemConfigVersionPath((RegistrySession) session);
Resource resource = ((RegistrySession) session).getUserRegistry().get(confPath);
if (resource.getProperty(nodePath) != null) {
resource.getPropertyValues(nodePath).add(nodeVersion);
} else {
List<String> list = new ArrayList<String>();
list.add(nodeVersion);
resource.setProperty(nodePath, list);
}
((RegistrySession) session).getUserRegistry().put(confPath, resource);
} catch (RegistryException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
示例4: removeItem
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
public void removeItem(String s) throws VersionException, LockException, ConstraintViolationException,
AccessDeniedException, RepositoryException {
try {
if (userRegistry.resourceExists(s)) {
userRegistry.delete(s);
} else {
throw new PathNotFoundException("No such path exists" + s);
}
} catch (RegistryException e) {
e.printStackTrace();
}
}
示例5: containsComment
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
private boolean containsComment(String pathValue, String commentText) throws Exception {
Comment[] commentsArray = null;
List commentTexts = new ArrayList();
try {
Resource commentsResource = registry.get(pathValue);
commentsArray = (Comment[]) commentsResource.getContent();
for (Comment comment : commentsArray) {
Resource commentResource = registry.get(comment.getPath());
commentTexts.add(commentResource.getContent());
}
} catch (RegistryException e) {
e.printStackTrace();
}
boolean found = false;
if (commentTexts.contains(commentText)) {
found = true;
}
return found;
}
示例6: containsTag
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
private boolean containsTag(String tagPath, String tagText) throws Exception {
Tag[] tags = null;
try {
tags = registry.getTags(tagPath);
} catch (RegistryException e) {
e.printStackTrace();
}
boolean tagFound = false;
for (int i = 0; i < tags.length; i++) {
if (tags[i].getTagName().equals(tagText)) {
tagFound = true;
break;
}
}
return tagFound;
}
示例7: isPwc
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
/**
* @param objectId
* @return <code>true</code> iff <code>objectId</code> is the id of a private working copy.
* @see RegistryPrivateWorkingCopy#PWC_NAME
*/
public static boolean isPwc(Registry registry, String objectId) {
String property = null;
try {
property = registry.get(objectId).getProperty(CMISConstants.GREG_CREATED_AS_PWC);
} catch (RegistryException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
boolean createdAsPwc = (property != null && property.equals("true"));
return objectId.endsWith('_' + PWC_NAME) || createdAsPwc;
}
示例8: createdConfigurationContext
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
@Override
public void createdConfigurationContext(ConfigurationContext configurationContext) {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
try {
Registry tenantRegistry = ReportingComponent.getRegistryService().getRegistry(
CarbonConstants.REGISTRY_SYSTEM_USERNAME, tenantId);
CommonUtil.addJrxmlConfigs(tenantRegistry);
} catch (RegistryException e) {
e.printStackTrace();
}
}
示例9: doGet
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
try {
resp.getOutputStream().write(RegistryUtils.encodeString("testing"));
} catch (RegistryException e) {
e.printStackTrace();
}
}
示例10: doPost
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
try {
resp.getOutputStream().write(RegistryUtils.encodeString("testing"));
} catch (RegistryException e) {
e.printStackTrace();
}
}
示例11: executeLocalQuery
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
private List executeLocalQuery(String sql) throws RepositoryException {
Registry registry = session.getUserRegistry();
Resource q1 = null;
List nodes = new ArrayList();
try {
//these modifications are done so the queries are not stored in the registry
// q1 = registry.newResource();
//
// q1.setContent(sql);
//
// q1.setMediaType(RegistryConstants.SQL_QUERY_MEDIA_TYPE);
//
// q1.addProperty(RegistryConstants.RESULT_TYPE_PROPERTY_NAME,
//
// RegistryConstants.RESOURCES_RESULT_TYPE);
//
// registry.put(RegistryConstants.CONFIG_REGISTRY_BASE_PATH + RegistryConstants.QUERIES_COLLECTION_PATH + "/custom-queries", q1);
Map parameters = new HashMap();
parameters.put("query", sql);
// Resource result = registry.executeQuery(RegistryConstants.CONFIG_REGISTRY_BASE_PATH + RegistryConstants.QUERIES_COLLECTION_PATH + "/custom-queries", parameters);
Resource result = registry.executeQuery(null, parameters);
String[] paths = (String[]) result.getContent();
for (String path : paths) {
nodes.add(session.getNode(path));
}
} catch (RegistryException e) {
e.printStackTrace();
}
return nodes;
}
示例12: initColl
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
public void initColl(String np) {
try {
resource = (CollectionImpl) registrySession.getUserRegistry().newCollection();
resource.setPath(np);
} catch (RegistryException e) {
e.printStackTrace();
}
}
示例13: save
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException {
try {
if (!(registrySession.getUserRegistry().resourceExists(nodePath))) {
throw new InvalidItemStateException("Unable to save the node at" + nodePath);
}
} catch (RegistryException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
示例14: loadJCRSystemConfiguration
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
private void loadJCRSystemConfiguration(UserRegistry userReg,String workspaceRoot) throws RepositoryException{
try {
RegistryJCRSpecificStandardLoderUtil.loadJCRSystemConfigs(userReg,workspaceRoot);
} catch (RegistryException e) {
e.printStackTrace();
// throw new RepositoryException("Registry Exception occurred while creating root node " + e.getMessage());
}
}
示例15: itemExists
import org.wso2.carbon.registry.core.exceptions.RegistryException; //导入方法依赖的package包/类
public boolean itemExists(String s) throws RepositoryException {
boolean itemEx = true;
try {
itemEx = userRegistry.resourceExists(s);
} catch (RegistryException e) {
e.printStackTrace();
}
return itemEx;
}